I’m developing a peculiar application which need to prevent the user can go out from application Activities, except with the ways I established inside the application. The Clock in tablet status bar for example allows to go in Android Settings, and I want to prevent it… because I need only some “device administrators” can access to android settings and other apps, others people must can only use this app.
There is a SDK solution?
PS I need to restrict capabilities only to device owner to prevent accidentally damage.
Nope nothing within the public APIs will allow you to do this. I understand that there are legit use cases for it, but to have it possible on all devices would create significant security concerns. (i.e. malicious apps could “lock out” users from their own devices.)
The closest you can get is create a replacement home screen that does not give the user the ability to (easily) go anywhere except where you want.
However as you’ve noticed with the settings in notification bar there are still loopholes around this. Another of such loopholes is many android keyboards contain a button that will take you to settings.
Also the user may still start their device in “safe mode” which would disable your application.
If you wish to implement this and have it be 100% effective you’d have to modify the OS to allow for it.