android

How to create on click event for children in Expandable list.

Hello. I am playing around with this example. http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList2.html I cannot figure out how to attach a listener to the children elements so that I can trigger some action when the user taps on the phone number. Any code or links would be greatly ...

How do you do a backspace escape character in Android?

Hi guys, I have a textView with some text in it. I want to delete the last 4 characters and then add on some more text. I tried doing this. textViewObject.append("\b\b\b\b new text that I am adding"); But instead of the \b doing a backspace, they show up as little squares in the textfield. Can anyone help me out here? ...

Disable notification of incoming/outgoing SMS in android..

Is it possible to disable SMS received and send notification in status bar ?? What is the procedure to do this ? ...

How to set wallpaper in Android?

Hi all I hav started doing app in Android. I want to set wallpaer in Android which run in Background(using Service) and the wallpaper will change within 5 minute in background. I keep the image files in Drawable. Anyone kindly send the coding for setting the wallpaer and retriving it after 5 minutes.. Thanx in Advance. ...

What's the best common format for an eBook like text to share with most of the mobile phone types

There is a description about a product or event that people would like to share among them. This can be a simple text or rich text too. They are looking into which format is the best for this purpose. They would like to see compatible with as many phones as possible. We are talking about phones that have Bluetooth. Also the text is lon...

Calculating points of a circle dynamically in an Android game

Hi there If my X co-ordinates increment every time a frame is drawn, what formula can I employ from the math library in order to have the Y co-ordinate moving around the circumference of a circle frame by frame, creating the illusion of an orbiting object around a continuously moving central point? I have seen it may involve sin or cos...

How to use Eclipse to create released signed apk?

I have been a Java programmer/instructor since Java was Oak (which is the development name for Java). Where can one find how to use eclipse to sign an app for release? I have found several how to docs/web sites, but not detailed enough for a newbie to this android world. I have a screen that comes up that wants the Alias, organiza...

android intent for sdcard ready

I have an application that uses a file on the SD card, the application runs when the phone boots, and it has become apparent that the file cannot be accessed when the program is first run as it starts working before SD card is avaliable. Is there an broadcast receiver I can use to tell when the SD card is ready? Update Just to summar...

Access to element on another activity.

I have a TabActivity with two tabs-activities FirstActivity and SecondActivity. How can I access to any element (for example, change TextView's text) on FirstActivity from SecondActivity? ...

running android source from git tree

I just downloaded the most recent camera app on the cupcake branch of the android source tree, mostly in order to find examples to steal from in order to control the camera in my own application. It got the source from here. However, when I opened up the extracted folder as a new android project in eclipse, I am getting TONS of compile e...

Force an android phone to sleep, in order to test?

I'm writing an android application that depends on network activity and the alarm manager sometimes waking the phone up from a sleeping state. My question is how can I reliably test this on device? Ideally, how can I force the phone into a full-on sleeping state. Failing that, how can I know for sure when the phone has fully gone to sle...

How does the Android Market search engine work?

How do you improve the position of an app in Android Market search results? The apps don't seem to be sorted on downloads. Edit: The scope of this question is limited to working with the Android Marker search engine, of which there's little or no information. I changed the title to make it clearer. ...

how to get the result from a sub activity.

Hi, When user presses a button from a webview, I open a scrollview activity with some buttons and edittext fields. Once the user enters the fields and presses the 'create' button, from scrollview activity, I want the results from the called activity to be accessible. How can I do thi? ...

How can I access Android's preset style attributes, so I can change them for my own?

This Stack Overflow Post says how to change the style of a button across the application, but I'm unsure what reserved names are used for LinearLayout, RelativeLayout, etc so I can do the same for other elements/views. Does anyone know how to find all the preset names or can you tell me them? Thanks! ...

Android: How to detect if an Activity goes into the background?

I need a way for my Activity to known that it's going into the background, and not when it's getting killed. I thought about hooking at onStop(), but onStop() is called for both cases. In other words, is there a way to tell if when my Activity is moving into the background and not getting killed? ...

Trouble adding footer to ListView

Hi, I have a ListView that I'm trying to add a footer to. For some reason, it won't show up. My footer is defined in a separate XML layout called layout_footer. View v = getLayoutInflater().inflate(R.layout.layout_footer, getListView(), false); getListView().addFooterView(v); Here is the code in my ListActivity's onCreate method. ...

Is it okay to sign two different applications with the same key?

I have made two versions of my application, a "large" version, and a "mini"/"lite" version. Should I be signing both of these with the same key? Or should I sign with a unique key for each of them? What are the repercussions of signing multiple applications with the same key? ...

getContentLength() return -1 only in WiFi ?

I want to know the length of the file, so i try getContentLength(). It works fine with network connection (edge/3g) but return -1 with WiFi ??? Why ? the wifi is good the file was found, can be download but the return of contentlength is always "-1", i dont understand, please help me. Is there an other way to get the length ? My code ...

Adding a tabhost in viewflipper

Hi, I am new to this platform and already starting to love it. I am work on a UI for a project which uses the tabhost to display two separate activities using a TabActivity class. This works ok. Now i would like to add a viewflipper to the equation. I am trying to add the tabhost widget to the viewflipper using the addView() method....

Android : don't show Notification if app is shown

Hello, 1/I don't want to notify user if this one is already running my app in foreground, is it possible before create nofification to check if my app is not in front ? 2/if app is in background, is it possible to bring last state in front ? I know that Os can destroy some Activity, but is it possible to restore last state, don't s...