0

I'm looking at making an application which doesn't yield to the home button when the button is pressed. Logically speaking I doubt this behavior is possible for security reasons (to prevent phones being hijacked). It is however an important feature for my app which is being written to help my mentally handicapped uncle use his phone.

My question at a high level is can I prevent him closing the application and returning to the core android home page/switching applications? Or is it the case that I would have to modify the android OS itself and create my own custom flavour and then jail-break/flash the phone with it?

Syntax
  • 2,155
  • 2
  • 23
  • 34
  • I found two good options for this, 1) ADW Launcher (If you want to customize it all yourself this would be a great head start) or alternatively there is a free launcher on the market called Kids Place which looks pretty promising when combined with Android Shortcuts to call the intended people (which show the contacts picture). – Syntax Jun 18 '12 at 02:29
  • ADW Launcher is the go, it is easy and does EVERYTHING you could want; unfortunately kids place did not support adding shortcuts. – Syntax Jun 19 '12 at 13:20

2 Answers2

2

You can't really do this without modifying the firmware. You can get close though by writing and installing your own launcher app that automatically starts your 'modal' app. So when you press home, instead of the the installed app drawer, you will land right back in your app. Of course this can be disabled, and might not be too smooth but should work.

Nikolay Elenkov
  • 52,576
  • 10
  • 84
  • 84
0

You can ask android to make your app the 'home' app for a time.

For ex: This is how the 'Car Home' app works. As long as the device is 'Docked', your app becomes the home app. (You'll have to research on what 'docked' means. Sorry, I have no idea at this point)

Declare this in your manifest as

<meta-data android:name="android.dock_home" android:value="true" />

and you're good to go.

Please check the documentation at

http://developer.android.com/reference/android/content/Intent.html#METADATA_DOCK_HOME

Also check this post.

Overriding Home button for a Car Home replacement app

Community
  • 1
  • 1
Madushan
  • 6,977
  • 31
  • 79