Reputation: 35
I'm developing an security application; which locks screen and apps/data. On the lock screen which will show when user unlocks device, I want to block user from seeing notifications etc. on Status Bar, which I want to make unaccessible, maybe hide completely; also hide/disable Navigation bar on devices that have virtual Home/Back etc. buttons.
How to get this feature on Android devices? Also, is this possible on iOS devices?
TY for taking time...
Upvotes: 1
Views: 2201
Reputation: 21
"You can block various SystemUI elements such as Navigation Bar, Status Bar and Lock by using an Enterprise Management API called DevicePolicyManager.
Android can run tasks in an immersive, kiosk-like fashion called lock task mode. You might use lock task mode if you’re developing a kiosk application or a launcher to present a collection of apps. When the system runs in lock task mode, device users typically can’t see notifications, access non-allowlisted apps, or return to the home screen (unless the home screen is allowlisted).
Once you acquire device owner privileges on the device, you can call Activity.startLockTask()
You can read about the implementation in the Google Documentation, linked below : https://developer.android.com/work/dpc/dedicated-devices/lock-task-mode#java"
Upvotes: 1
Reputation: 35
To achieve this, someone can use LockTaskMode on Android devices; this turns device into a Dedicated Device which only gives user ability to use device features which is permitted by author.
Unfortunately, I don't know how to achieve this on an iOS device.
Right now I'm working with an Android device, if I start working on iOS, and, find a way to achieve this on iOS too, I will update my answer. (Meanwhile, if you want to extend my answer, please don't hesitate.)
Upvotes: 1
Reputation:
Lock screen when user leaves your app or when the user presses the home screen and lock screen should show when they reopen the app {Resume}?
Upvotes: 1