android

Show soft keyboard when Activity starts

I have 2 activities, A and B. When A starts, it checks for a condition and if true, it calls startActivityForResult() to start B. B only takes text input so it makes sense for the soft keyboard to automatically pop up when B start. When the activity starts, the EditText already has focus and it ready for input. The problem is that the ...

An example of when to have multiple "activities" in an Android application

I seem to be missing something obvious here, why would I want more than one activity per application in Android? Does somebody have some solid examples? ...

Drawing translucent bitmaps using Canvas (Android)

I have a Bitmap object and want to render it to a Canvas object with varying levels of translucency (i.e. make the whole bitmap partially see through). For example, I have sprites in a game (that are drawn over the top of a bitmap background) that I want to fade out from being opaque to being invisible. Can I do this without having to re...

Can't start activity. Says, activity destroy timeout for historyrecord

Any ideas what could be causing the message from ActivityManager, "Activity destroy timeout for HistoryRecord" when attempting to end an activity. This prevents the activity from restarting. I'm stuck. Don't even have an idea where to look. ...

Problems with calendar application on Android 2.1

Hi, I have compiled the android 2.1 source code and I can start the emulator. But I can't launch calendar application. Every time I tried to lauch the calendar application, it crashed. The log is as following: // CRASH: com.android.calendar (pid 272) // Short Msg: java.lang.NullPointerException // Long Msg: java.lang.NullPointerExcepti...

JSON: Jackson stream parser - is it really worth it?

I'm making pretty heavy use of JSON parsing in an app I'm writing. Most of what I have done is already implemented using Android's built in JSONObject library (is it json-lib?). JSONObject appears to create instances of absolutely everything in the JSON string... even if I don't end up using all of them. My app currently runs pretty w...

Android Bind Spinner to Class

I'm having some trouble with the Spinner widget. Given the following code: ArrayList<Person> people= new ArrayList<Person>(); Person = null; for(int i = 0; i!= 10; i++) { p = new Person(); s.setID(i); s.setName("Name " + i); people.add(s); } I'm using the following code to bind it to a ...

Any receiver for sent SMS messages?

Hi we get an event when new sms come in android but can we get any event when user send a messages, in short is there any receiver to track sending sms as we track incoming sms. ...

How to get CPU usage statistics on Android?

I want to get the overall CPU usage on Android, similar to what Windows' Task Manager does. I can parse the output of the top program included in Android, but if there is a API call that does the same thing, it would be better. Any pointers? ...

What is the difference when a class extend from Handler and Thread? (In Android framework)

What is the difference when a class extend from Handler and Thread? As described in developer.android.com ... Each Handler instance is associated with a single thread and that thread's message queue. ... Does the thread has no message queue ? Any benefit for a class extend from Handler? ...

android adding image to location of google map

Hi I'm beginner in android i want to create google map appliction which should show the image of the place when i click the marker of that place, how to do this plz help me. Thanks. Sanju ...

how can i get proper Uri of a particular contact in android 2.1

I have written an application and added 2 contacts on emulator, but i am not able to update their names on android 2.1, code is working on android 1.6 platform with the following code. ContentValues contactValues = new ContentValues(); contactValues.put(Contacts.People.NAME, firstName+" "+lastName); getContentResolver().update(UpdateCon...

possible xml elements in Android resources xmls ?

I recently came across a forum post in the android developers group. (link below) http://groups.google.com/group/android-developers/browse_thread/thread/ef3bdebcb715b385 It has one post which contains following xml. It is xml file which can be used in drawable folder. <selector xmlns:android="http://schemas.android.com/apk/res/andro...

Android - ListView click HOWTO?

Hi, How do I listen to click event on a ListView? This is what I have now ListView list = (ListView)findViewById(R.id.ListView01); ... list.setAdapter(adapter); When I do the following list.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { public void onItemSelected(AdapterView parentView, View child...

What values does Camera.Parameters.set("picture-size", ?) take?

Hi, my app involves some work with the camera, therefore it needs to handle capturing of images with different resolution. My targets are 1.6 - onwards. Does anyone know what to pass in the value argument for Camera.Parameters.set("picture-size", value) I have look at the Donut release of the Camera app, however, it was not very clear...

Process in updating my app in the market

Hi, i have released a version 1 on some app in the market. Can anyone tell me how to give an update of it? thanks ...

Post comments on a WordPress page from Android application

I need to post some text to a remote server over HTTP, this server in turn puts these comment on a Wordpress page. I am still waiting for interface details. Is it possible to post comments directly on a Wordpress page from an Android or Java application? Links to relevant documentation, tutorials etc. is appreciated. Thanks. ...

Start 2 emulators with different locale android

Most of the idea is in the title, I just would like to know if it is possible to start 2 emulators at the same time with 2 different locale (to test the I18n of my app). If there was a way of doing it in Eclipse, that would be greater... ...

How can I update information in an Android Activity from a background Service

Hello, I am trying to create a simple Android application that has a ActivityList of information, when the application starts, I plan to start a Service that will be constantly calculating the data (it will be changing) and I want the ActivityList to be in sync with the data that the service is calculating for the life of the app. How ...

Document Visualization in android?

Is there any document visualization toolkit available for android? ...