Pushing application from foregound to background

by Safy » Wed, 30 Sep 2009 02:09:17 GMT

Sponsored Links

   How can I push application from foreground to background on
keyevent. In Blackberry you have a function called request background
which pushes the UI application from foreground to background. How can
I achieve this functionality in Android, is this possible ?



Pushing application from foregound to background

by Mark Murphy » Wed, 30 Sep 2009 02:13:20 GMT


Have the user press the HOME key.

Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

_Android Programming Tutorials_ Version 1.0 Available!


Sponsored Links

Pushing application from foregound to background

by Yusuf Saib (T-Mobile USA) » Wed, 30 Sep 2009 03:02:41 GMT

 It depends on what you mean by "background". If you want the Activity
to disappear and not to anything until next time, save your state and
call finish(). OTOH, if you want it to continue doing something in the
background, you can run a Service as part of your app.

Yusuf Saib
T  Mobile stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.


Other Threads

1. Android Freeware Paint

Hi Guys,

I have developed the Android Freeware Paint App which can be
downloaded from <A HREF="http://www.freewarelovers.com/android/app/
android-paint">AndroidPaint</A> This can also be downloaded from <A

I will be looking forward to your feedback on this App.



2. Detect bluetooth headset status changes


I'm trying to launch my app when a BT headset is connected to the
device although I haven't succeded.

In the manifest I have:

<receiver android:name=".BluetoothNotificationReceiver"
android:name="android.bluetooth.intent.action.HEADSET_STATE_CHANGED" /

and a class:

public class BluetoothNotificationReceiver extends BroadcastReceiver {
        public void onReceive(Context context, Intent arg1) {
                Toast.makeText(context, "This is a test.\n",

But nothing happens when I connect or disconnect the BT headset
besides the system headset plug message.
What am I doing wrong?


3. code to call Android Music player Application

4. how to get the subview in the GridView?

5. npapi plugin for android

6. NFC doubts. JSR 257 - 177

7. to startup with developing apps