How can I check if GPS is enabled on the phone programatically? (android)
I want to check if GPS is enabled, but I dont know how to do it. i mean with a function, in android EDIT: sorry i forgot to tell you that i am programming with android ...
I want to check if GPS is enabled, but I dont know how to do it. i mean with a function, in android EDIT: sorry i forgot to tell you that i am programming with android ...
I am writing an andrid program to save sms from certain number to a sdcard, however for some reason the sdcard is not writable. I have the write permissions set up and the program recieves the sms and knows when it is from the right number. However the program always fails to write to the sdcard. I HAVE ALL the write permissions set up o...
I am trying to run a service that polls the server every ten seconds and broadcasts the intent. I tried using Thread.sleep(10000) but that dint work. I found out about this START_NOT_STICKY constant used in the service. But I am unable to figure how do I use it. Can someone please help. @Override public int onStartCommand(Intent int...
Hi, I want to record a sample from the microphone, then I want to play the recorded file maximizing the volume and apply some audio effect, like modifing sample rate or addind an echo. Waht is the best way? is there an example? ...
I want to know when Android's contact launch activity is opened because my application opens after a call is finished and then the contact launch activity is opened after it meaning it will cover my app's activity leading to that I have to press "back" button to see my app. That is, I want to open my app after contact launch activity ha...
Hello, I'm trying to have my IntentService show a Toast message, but when sending it from the onHandleIntent message, the toast shows but gets stuck and the screen and never leaved. I'm guessing its because the onHandleIntent method does not happen on the main service thread, but how can I move it? Has anyone has this issue and solved i...
I am trying to write the logic for an animation sequence and can't seem to get the thing right. What I want to happen is: if the user clicks on the screen, the method takes in the touchEvent coordinates, and then changes the movement variables of a sprite so that the sprite travels to where the user touched the screen. I have my "launc...
Obviously the answer is no... right? The reason I ask is because I have this string defined in XML for an Android app: <string name="foo"><![CDATA[<html><body><p>This%20is%20a%20test</p></body></html>]]></string> All I do to the string is read it, and display in an HTML view. I would not have expected the %20s to be interpreted, yet t...
One part of my layout is supposed to have two components: A ScrollView on top, and a MapView on the bottom. Both views should be exactly half the size of the parent. I have the size of the parent (I'm switching to this layout at a point when I already have the size), but I don't know how to define the maximum size. Besides, I figure the...
I'm attempting to overlay one image on an image taken by the device camera and save the result back to external storage. I'm continually running into: java.lang.OutOfMemoryError: bitmap size exceeds VM budget which I generally understand but in this case I cannot downsample the image from the camera because I want to preserve the orig...
My app works with pictures. It can take multiple pictures as an input, process them, and send them again to another app. As a consequence, my main Activity has declared an intent filter on ACTION_SEND_MULTIPLE for image/* mimetypes and can result in issuing a new Intent with the same action and data type using Activity.startActivity(Int...
I want to build MusicPlayer, using source code of standart android music player(projects / platform/packages/apps/Music). I also renamed the package (for no conflict with emulator app) When I build the project and run it, I have following error: Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED ...
I simply want to run a check to see if a specified object is in the sqlite3 database, and if it is, delete it, and if it isn't, add it. I have not found a way to get consistent results. I add, then I expect to delete, but it adds a second row and I can only seem recognize when there are 2 duplicate rows, and then delete. ...
I have a dynamic table layout created in OnCreate(). Everytime the activity resumes, the data in the table rows can change, so I would like to destroy the table rows and create new ones. How can I do that? Thanks!!! Here is what the OnCreate table creation portion looks like: tableLayout tl = new TableLayout(this); for (i = 0;...
I have a video stream that I used in an iPhone application. I'm now working to port the application to Android so I want to use the same stream. As Apple requiered, I created a HTTP Live Streaming (media segmenter, m3u8 file, etc.). You can find the stream here: http://envue.insa-lyon.fr/smartphone/aloun_stream/prog_index.m3u8 . I wan...
I am designing a simple Android game using a surfaceview similar to the Lunar Lander sample provided by Google. I want to have various things such as highscores, messages, menus etc pop up on screen with the surface view still in the background. The problem is that I want the "pop ups" to contain many design elements such as images, tex...
Hi I am making a app that fetches a xml file and displays the results with a button labeled get it. I need help with when the button is clicked it will take the .pkg file url in the xml file and download it with some sort of progress reporting. Any help would be awesome thanks in advance. Here is what I have so far it has a error in the ...
Has anyone had any success getting an android device to participate in a two-way SSL hanshake? ie with a client cert involved on the device? After installing the client cert from the sd card - i cannot connect to the URL that requires a two way ssl handshake in either the browser or the mail app. (we secure our mail server behind a har...
I'm interested in developing an android application that will display a globe of some sort like Google Earth. I've never used opengl or have any experience with graphic programming so I'm here to learn some basics. Now, I know there are things like the Unity or Ogre that help facilitate graphics but what exactly do I gain from using the...
I am trying to run Apidemos sample on my PC. for that fst i hav launched AVD nd then run tht Apidemos app.. but it is giving me following errors... [2010-10-16 10:33:43 - ApiDemos] Performing com.example.android.apis.ApiDemos activity launch [2010-10-16 10:33:44 - ApiDemos] Automatic Target Mode: using existing emulator 'emulator-5554' ...