I'm trying to develop an android app that will replace the stock lock screen
and acquire the basic functionality of a typical lock screen
. I'm planning to support the app from API level 15
and higher. But I'm facing some problem regarding lock screen
behaviour. I'm not yet able to disable the home
and recent button
of soft navigation bar
. I've found lot of examples in stack, github and other sources but those are not so useful.
I've tried in following way:
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
Added following flags in LockActivity
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON |
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED |
WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
| WindowManager.LayoutParams.FLAG_FULLSCREEN
| WindowManager.LayoutParams.FLAG_DIM_BEHIND);
But didn't get any effective solutions. I've found ZUI Locker a very nice app doing what I actually want. How they are accessing the permissions to work like a default lock screen ?
Any suggestions ? Thanks in advance!