The only way to catch it is to define an activity in your AndroidManifest and have it handle the following intent filter:

<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

Note that the user will be prompted when they hit home to select between all the activities that are capable of handling the main intent (namely, the bundled launcher, your app, etc.)

cheers,
steve

------------------------------------------------------------------------

        tamal <mailto:bhattacharya.ta...@gmail.com>
December 16, 2010 2:32 AM


Hi All,

I found out from the forum that overrding the HOME key is not possible
in android. I need to have my application to have complete control
over the device.
So I tried to write a broadcast receiver to listen to the HOME intent
but was not successful. Still on presssing the HOME button the Home
screen would launch.

The manifest is like:

<receiver android:name="StartupIntentReceiver">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.HOME" /
</intent-filter>
</receiver>

Could some one please help with the feasibility of this?


--
stephen lau | st...@grommit.com | http://whacked.net | @stevel

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

<<inline: compose-unknown-contact.jpg>>

Reply via email to