-1

How can we override the home key in Android JB and above.I have searched a lot of threads but those doesn't work for Latest android versions.Also this is possible as I have checked in some apps available in Play Store such as "Active LockScreen".

ddnith
  • 151
  • 4
  • 12
  • 1
    not possible to override home key – Raghunandan Sep 27 '13 at 19:21
  • @Raghunandan ... yes it's definitely possible ...please check this app "Active LockScreen" on Play store – ddnith Sep 27 '13 at 19:23
  • 1
    not possible without a workaround. implement a home screen – Raghunandan Sep 27 '13 at 19:23
  • @Raghunandan I have already checked the link for whicj you have duplicated my question.It doesn't work. – ddnith Sep 27 '13 at 19:32
  • @ddnith A quick question, do you just want to detect if user has pressed the`Home` key and do something on the key being pressed(and app goes to background)? Or you want to change its functionality completely? Or some other stuff. I understand that you want to override it. But what exactly you want to do with it? – Shobhit Puri Sep 27 '13 at 19:59
  • @ShobhitPuri I want to change the functionality.I want to keep my activity in front even if HOME key is pressed.Actually I want to implement mu own lock screen. – ddnith Sep 27 '13 at 20:06

2 Answers2

1

you cannot override the home button for security reason. it is the only way a user can always leave an app

tyczj
  • 71,600
  • 54
  • 194
  • 296
0

As of now I have found the way by making my app Launcher and let the user chose if he/she want to disable the home key functionality while App is running.While App is not in foreground My App fires Intent DEFAULT_LAUNCHER_INTENT to display the DEFAULT Launcher. I'll post if find another work around without making the app Launcher.

ddnith
  • 151
  • 4
  • 12