-4

I'd like to lock the screen. I want to disable the home key.How do I accomplish this? And I wonder why some lockscreen apps ask for setting the Launcher? How to shield the home key by implementing a custom Launcher. getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD) does not work in android4.0. So, what do I need to do in android4.0?

laxus
  • 3
  • 2
  • Disabling the Home key is a violation of the principles of Android! Every app can be (should be!) uniformly controlled with the Back and Home keys. If you disable the Home key, you lock users out from jumping Home and launching something else. So why do you want to do this?? – Tickled Pink Mar 14 '14 at 09:48
  • you cant, your cell wont allow you ;-) – Atul O Holic Mar 14 '14 at 09:50
  • I want to write a Lockscreen.So I need to disable the homekey. – laxus Mar 14 '14 at 15:19

1 Answers1

1

It is android security violation. Only way you can do this is to implement custom launcher.

Sergey Pekar
  • 8,555
  • 7
  • 47
  • 54