android

How do I create an intent to launch any e-mail app?

I have found various topics here and elsewhere on creating an intent for sending e-mail and that seems to be pretty straightforward. I'm looking for an intent to just launch any e-mail client the user might have. Here is the code I've seen for sending an e-mail (posted just for reference, this doesn't serve my needs as I don't want to s...

HTC Hero Update 2.1 --> Broke Audio Streaming ????

Hi there, I have installed the 2.1 update on my HTC Hero yesterday, and happy as a puppy I instaleld my streaming app... Just to discover that it won't stream decently... It has to stream an mp3 stream and it works on my ADP 1.6 device, on a Samsung Galaxy S test-device (with 2.1) and on the 2.1 emulator... Logcat is gettign the follwoin...

Android, any way to controll the default music player

I would like to add a music controller to my app so the user could pause the music and start it again. It would also be great if the user could jump between songs. I haven't found anything in the API but I want the same behavior that is available in any headset so there must be some API right? Anyone who has an idea on how to control ...

How to detect if view's parent activity is being destroyed.

I want to do some cleanup in a view when the activity is being destroyed. Is there any way to get a callback in the View when the activity is being destroyed? I tried using onDetachedFromWindow, but I'm not sure whether it is correct thing to do. ...

Android - how to create kml file locally on android platform?

Hi everyone. I have a problem with creating a kml file locally on android. I know how to create xml file in java, but it seems that android doesn't support "transform" java methods libraries. Any idea on that? Help greatly appreciated! ...

Edit Text value is not updated

Hi ,In my application I entered value into editText field into 2 ways one is Depending on the spinner selection value will be changed and other way is through softkeyboard. Now problem is when i entered value into the edittext through key board and orientation is changed at that time edittext field contain the value depending on the spi...

Bluetooth socket connection

Hi How can i know if a BluetoothSocket is still connected to the endpoint? How can i detect if the socket has been disconnected by the endpoint? Thanks ...

Android single- and multi-stroke gestures in the same library confuses the GesturesOverlayView?

I have noticed a problem on various handsets that if you save gestures while the stroketype is set to single and then change the stroketype to multi and add some multi-stroke gestures, the multi ones are often not recognized by the GesturesOverlayView when you draw them. These can be very simple gestures such as a + or an X. What happens...

To parse an xml file

Give me an example on how to parse a custom xml file using DOM ...

"Thread already started" when resuming the activity

Hi all. Here is my situation: I am building a game for android and my game's activity is composed of a custom surfaceView which has a thread for the game logic and rendering. The architecture is similar to the LunarLander demo from Google's website. When the activity starts it creates the surfaceView and calls this method: @Overr...

Can unregisterForContextMenu completely unregister a View?

I have a ListView, which can either have a context menu, or not. I am using registerForContextMenu and unregisterForContextMenu respectively and have no problems with the registration itself or anything related to the context menu showing up/working. When a view is registered for a context menu, when the user clicks it, its background c...

How to clear Intent that started Activity?

At the beginning Activity is launched by an Intent and something is done with this Intent. When I change orientation of my Activity, it's reloaded again and Intent is passed to the Activity. How can I clear that Intent to prevent Activity from using it again? I've tried setIntent(null), but with no result. ...

Embedding image in email in Android

Is it possible to programatically embed an image in the body of an email sent by the Mail app in Android? Can I use the ACTION_SEND intent to do this, or should I compose the email myself? ...

how to access TextView content in xml file to java file in Android

some1 post the code for accessing .txt file available in my res folder the code for which can be written in .java file!!! ...

Continuous Speech Recognition Android

Hi, I am looking at doing speech recognition in android. The program needs to have continuous speech recognition. The library only needs to be about 10 words. I have considered using Googles api, but I don't think it will work. (I cannot have anything covering the screen). I have been looking into other ways but nothing seems like it wil...

draw a cube at specific co-ordinates?

Hey Guys, I'm looking to draw a cube at specific co-ordinates. I've got all 4 corners and the centers x/y value. I now want to construct a cube at those co-ordinates. Does anyone know of any tutorials or have any information on how I would go about said task? Ive got the following code. I'd like to map each of its corners to a specific...

Inflating a view into Button?

Hi, I saw this questions unanswered on some forums and wonder if anyone have a clue on how to answer. Let's say for instance a button is needed with a picture and a text. It would seem natural to create an xml view and then inflate it into the Button. Is this possible? At the moment I don't need the button to look clickable or change ...

How to capture finger movement direction in android phone?

I want to capture the finger movement direction on Android touch phone. If a user slides his finger in up/down/left/right direction, I want to capture this direction. How can I find this? Thanks. ...

Application access permission to files on internal storage

A question about the internal storage that's private to each application (especially when storing files with Context.MODE_PRIVATE). How is that storage actually assigned to the application? Just by package name or also somehow bound to the sign key of the app? Let's say I have installed application 1 and then write another application...

Automatic start/uninstall of an app

I am trying to do something similar to the "SpeechSynthesis Data" app in the market. After installation it automagically starts itself, downloads the speech data to the sdcard, then uninstalls itself. Does anyone know how you can have an app automatically start after installation? I can't find any info on that. ...