android

ActivityGroup not handling back key for ListActivity

I am using an ActivityGroup to spawn multiple activities and switch views from within the same tab in a TabActivity. When I press the back key this method is called inside my ActivityGroup public void back() { if(history.size() > 0) { history.remove(history.size()-1); if (history.size() > 0) ...

searchText and findText not working for android solo tests when there is a message notification?

Using Android2.1 when I try to use solo's searchText or findText it isn't able to find text in text notifications created with makeToast, has anyone ran into this problem before and know a fix? ...

variable scope with inner classes

I am creating a Splash screen(Activity) in my Android app. I have an inner class which extends AsyncTask. The constructor for this inner class accepts a Context object, which is being sent inside the Splash activity's onCreate method. There is also reference to a constant String field. public class Splash extends Activity { private...

Geocoder is not working on a tablet PC(Android pad)version-1.5

Hello buddies, Hi am developing an app on Smartpad (1.5) ,you can call it as Android tablet PC too....I have created a map activity where i am using Geocoder gc=new Geocoder(this, Locale.getDefault()); List foundAdresses = gc.getFromLocationName(address,5); to return a list of adress near by locatio...

How to stop already running media player instance when again start that activity, after pressing the back button

I have created two activities say A and B. Activity A lists list of songs. When we press in any of these songs, the activty B will be called by using startActivity(). Now the activity B will start one thread to create and start mediaplayer with selected song and also show song progress. Everything works fine if we press the back button i...

FaceBook Api for Android

Hi all, I want to develop facebook client in android using fbrocket api.but,this api only allows input as facebook api key not the username and password. is there any solution?.. Thanks in advance ...

How to make transparent gradient?

I have the following gradient: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"&gt; <gradient android:startColor="#ECECEC" android:centerColor="#F6F6F4" android:endColor="#F8F8F6" android:angle="90" android:d...

Queuing Intent for IntentService from within IntentService

Is it possible, with an IntentService, to send another intent to the IntentService from within the IntentService? For example, say my IntentService is processing an Intent which has it write a bunch of data to the database. During this time, several other Intents to write other data may [or may not] have been queued up in the IntentSer...

Make HTTP connection using GSM network, not WiFi

I need to make HTTP request on Android using GSM connection, not Wifi. My current solution is to disconnect from all wi-fi connections and perform a request. Is there any better solution? I could not find any relevant methods in the API (I looked in package org.apache.http, but it seems it is completely unaware of what type of connectio...

address family not supported problem

hi, im using eclipse 3.6.0, jdk 6, build target is android 2.2, i'm developing under windows 7. im trying to fetch a xml file like the following: SAXParserFactory spf = SAXParserFactory.newInstance(); try { //get a new instance of parser SAXParser sp = spf.newSAXParser(); //parse the file and also register this class for...

Android there is no ListView adapter resourceId

based on Hello-ListView turorial in Android, http://developer.android.com/resources/tutorials/views/hello-listview.html on the setListAdapter(new ArrayAdapter<String>(this, R.layout.list_item, COUNTRIES)); had an error because there is no R.layout.list_item previously i had followed the tutorial, created the file list_item.xml on ...

can I send a short voice recording to another non mobile phone

Hi I would like to be able to program the Android to send a short voice recording (approx 10 word message) to a land line (i.e non mobile) phone. Is this possible? I have googled re this and it appears that though I can send a text message I cant do the voice message thing. Is this still the case? Thanks Ron ...

activity creator

What is activity creator in android?? ...

Android: Bitmap recycle() how does it works

Hello. Lets say i have loaded an image in a bitmap object like Bitmap myBitmap = BitmapFactory.decodeFile(myFile); Now what will happen if i load another bitmap like myBitmap = BitmapFactory.decodeFile(myFile2); What happens to the first myBitmap does it get Garbage Collected or do i have to manually garbage collect it before load...

Fastest way to read long[] from file?

I have a file that contains about 200,000 long values that I want to read as fast as possible into a long[]. It's for an Android app; function calls are slow (so anything involving reading a long at a time with a "for" loop will be super slow) and I need loading to be fast. What can I use? Everything I look at seems to read only bytes fa...

Android- the DDMS shows the message: logcat read: Invalid argument

So how can I fix this problem. It seems my DDMS is broken down. ...

End Call in Android

Hi all, I want to end the outgoing call after few seconds..here is my code.. public class phonecalls extends Activity { ComponentName cn; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); call(); }...

Selecting Android Spinner Causes WindowManager$BadTokenException

I created a custom AlertDialog to display a Spinner and some EditText elements. When I select a menu option, this custom AlertDialog gets launched. Everything works fine until I actually select the spinner to try and select an item, at which point I get the BadTokenException. I've read other StackOverflow posts saying that similiar excep...

Problems with HelloGridView tutorial from Android Developer site

Hi, i test this tutorial with the sample images they have and work's ok but when i put my own images then application crash (stopped unexpectedly) why? the only i do is to put my own images with the same name than sample images.... for example, i erase sample image "sample_0.jpg" and i put my own image from my harddisk with the same n...

Android 1.6 SDK Downlod Asset to Local Storage initial start

I am trying to download a zipped file from the web on the first instance of the application; can someone point me to a tutorial for this (I don't see good documentation on developer.android)? I understand how to check if it's the initial start or not, and also how to use java.util.zip once I get the file, but it's the in-between where I...