-1

For home button disabling:

  • Home key pressing event cannot be intercepted in activity by onKeyDown() beyond version3.x.
  • I can add: in the intent-filter of the activity, but this will make even pressing home button outside of the activity to launch the activity. What should I do so that the home button is only disabled when the activity is visible to the user?

For task history button disabling: I haven’t anything that helps until now. What should I do so that the task history button is only disabled when the activity is visible to the user?

  • 2
    you should build a custom rom because you cannot override the home button for security reasons – tyczj Aug 08 '14 at 00:45

2 Answers2

0

There is no way to do this and you should not try to do this.

These buttons are design to let the user close an app easily and switch from one app to another. A contrario, the back button is design for navigation, so the SDK allows you to override it in order to handle your own navigation, if you wish it.

However, few tricks could help you to do it. With the permission SYSTEM_ALERT_WINDOW you can draw something on top of the bar. But it's highly annoying for the user.

Arnaud
  • 509
  • 5
  • 13
0

And what if that is what the client is requiring for a Non - Public development???