android

GpsStatusListener: no satellites used in fix although status is GpsStatus.GPS_EVENT_FIRST_FIX

I added a gps status listener to my location manager in order see when I get the first fix. When I receive the GPS_EVENT_FIRST_FIX I then loop through all the satellites, but why is none of them used in the fix? (usedInFix()). My log says 'false' for all satellites? final class GpsStatusListener implements GpsStatus.Listener { pub...

Changing background in Launcher

Is there a way, either programmatic or with user gestures, to change the background of the launcher app? It's a dismal black background. I'd like a sunny yellow. How to do this!? Peter ...

Doubts with base adapter class and its functionality

Hi ,I am trying for the customized list view, I am adding the list of objects using array list and i send it to the class that extends base adapter and when i extends the base adapter class,it implements some methods such as getView etc. and in the getView i am sending it to the class which assign the names(datas) to customized menu ...

calling listactiviy from tabactivity in android

Is it possible to call listactivity through tab activity? Basically, I am developing an app with 3 tabs, for which I am using tabactivity. Furthermore, in one of the tabs I want a listview, so I have derived from listactivity. Now I want the click event to be determined in the listview. Am i missing something? public class Tabissue ext...

Android : how to know when an app enters or the "background" mode ?

I am trying to achieve the following with Android : when the app is in background, a thread polls a server every now and then to retrieve data and notifies the user if new data is available. I am using a Service for that, fine. when the app is in "active" use, i.e. one of its activities is visible, the polling should stop as it might...

To Read XML file in UTF-8 format string using Android.

Respected All, I have to read XML file, for that I use SAXParser and DefaultHandler using method characters(char[] ch, int start, int length) but it gives output with some extra characters such as [] in place of '#13'. someone told me that if I read that string in UTF-8 format then it will remove that all the extra characters....

Android Download Service

Does anyone have a good example of using a service to download a file? I am not sure whether to use remote or local and even if I was sure, I need a basic example to start with. Basically, I want to start the service with the url of the file to downland and when the download is done end the service. Google's example of services is fil...

Failed to load properties file for android project

Hello. I finally was able to build and debug the android platform with this tutorial. I imported my project in eclipse, and afterwards installed ADT. Then I converted my imported project to android project (Android Tools -> Convert To Android Project). And now I'm having Failed to load properties file for project 'droid-platform' error....

How can I detect if user selected from createChooser options?

I have a code that will prompt user to send a message by selecting the desired application, how can I detect if the user actually have chose from the options or instead pressed Back? I tried to check if the intent returned something, but is running asyncronous so cannot be tracked. Also I have tried to run the intent with startActivit...

How to track down which field is causing NullPointerException when inserting custom field into Contacts Data table?

The full exception I get is: 07-16 19:19:17.244: ERROR/DatabaseUtils(151): java.lang.NullPointerException 07-16 19:19:17.244: ERROR/DatabaseUtils(151): at com.android.providers.contacts.ContactsProvider2.insertData(ContactsProvider2.java:3069) 07-16 19:19:17.244: ERROR/DatabaseUtils(151): at com.android.providers.contacts.Contac...

Android how to create file in Phone memory

Hi all, How do i create a file in phone memory instead of SD card. ...

Upload file on apache server

Hi! is possible to upload a file on apache server using commons-fileuploader jar file in android .. if yes then please give any reference site if no then please guide me. ...

How to play audio files one after the other

I have multiple audio files in the assets directory of my application. When the user clicks a button I want to play those files in a certain order, one after the other. There shouldn't be any noticeable lag between the audio files. What is the best approach to achieve this? I am thinking of using MediaPlayer objects and OnCompletionList...

What to do when - java.io.FileNotFoundException: No content provider??

Hi everyone, when I try to attach a file to an email, I get a java.io.FileNotFoundException: No content provider logcat output. If anyone could tell me what I am doing wrong or what I should do instead, that would be great.Thank you. This is how I add the files to the email..: Intent sendIntent = new Intent(Intent.ACTION_SEND); ...

how to add parameters in android http post ?

friends, i am trying to upload file to php server using following tutorial http://getablogger.blogspot.com/2008/01/android-how-to-post-file-to-php-server.html i dont know how to add parameters like userid="12312";sessionid="234" in it. any one guide me how to achieve this? any help would be appreciated. ...

What is the difference between Option Menu and Panel Menu in Android?

I just created a Panel Menu by mistake with the auto-completion of Eclipse and did not realise it before I read my code. As I wanted to have an option menu, I didn't see the slight difference in the display so does anyone know what the difference(s) is/are between these 2 menus? Is there any advantage or drawback for using one or the oth...

Play audio file from the assets directory

I have the following code: AssetFileDescriptor afd = getAssets().openFd("AudioFile.mp3"); player = new MediaPlayer(); player.setDataSource(afd.getFileDescriptor()); player.prepare(); player.start(); The problem is that, when I run this code, it starts playing all the audio files in the assets directory, in alph...

Google Maps & apps with mapview have different current positions

I have a mapview where I want to track the user's current location. GPS as well as 'use wireless networks' is activated in my phone settings. Nevertheless, since I'm indoor I don't get a GPS fix, therefore the location is determined via network; wifi spot is available. I have the Google Maps app running as well as my application running...

Android relative layout placement problems

I have been having problems creating a relative layout in XML for a list item to be used for a series of items in a ListView. I have tried for hours and am tearing my hair out trying to get it to look how I want but cannot get everything to appear in the correct spot and not overlap or mis-align. I can get the first image and next two te...

How to elegantly access Android Views from other thread?

I'm using Twitter4j in asynchronous mode. When I get response in Listener I want to be able to change some Views in my Activity but it results in CalledFromWrongThreadException. I know that I can use runOnUiThread method, but what is the most elegant solution for this apart from inlining Runnable Classes? Part of my Activity: Twi...