1

I am developing an android lock screen and need to disable the navigation bar. Using a launcher you can disable the home button and you can override the back button, but you cannot override the recents button. Is it possible to disable or clear the recents soft key temporarily?

Follow up question - has anyone been able to programmatically disable and enable the nav bar via root on jelly bean?

What about using lights out mode and overriding onSystemUiVisibilityChange while capturing the touch?

I have decompiled toddler lock - which implements this functionality, but it uses some hackery and the main activity is corrupted.

1 Answers1

0

There is no way to this on a stock device. You'll have to customize the Android OS. Any 'hackery' you are seeing is likely to break with the next update. You can't really replace the system lock screen either.

Nikolay Elenkov
  • 52,576
  • 10
  • 84
  • 84
  • Update: I have successfully disabled all of the navigation bar buttons without root. Message me for details. (Using as launcher and flooding recents etc.) – Morgan Culbertson Nov 20 '12 at 14:35
  • Whatever you did, it depends on implementation details which change from version to version. And *will* eventually break. And no, no one is going to 'message you'. You either post it as answer, or keep it to yourself. – Nikolay Elenkov Nov 20 '12 at 14:46
  • OK. I am sorry Nikolay. My fix - with a lot of help from the author of Toddler Lock - uses on back pressed to handle the back key, launcher preferences to handle the home key, and I flood the recent apps list with dummy applications. Added on to that I override on window change to go back to my application. – Morgan Culbertson Nov 22 '12 at 04:01
  • Using the package manager, flooding the recent apps list is not a major overhaul on the system. It is easy to enable and disable the classes. – Morgan Culbertson Nov 22 '12 at 04:03
  • Glad it works for you, but it will probably be blocked in a later version. BTW, on 4.2 using multiuser support you can disable all system apps and only allow the ones you need to achieve something similar, but still not ideal. And Android will probably never allow you to override the *real* lockscreen. – Nikolay Elenkov Nov 22 '12 at 04:07
  • Yes. Good point. I will explore a fix with multi user support. Thanks for the suggestion. – Morgan Culbertson Nov 22 '12 at 13:58
  • @AtomicLock sir how did u manage to disable the navigation bar ? – Rat-a-tat-a-tat Ratatouille Dec 07 '13 at 12:51