2

I have developed an app for a job that will be used by their customers.

Each customer (Anonymous) enters there, uses app (tablet) and then leave.

The thing is that I want the users not to leave my app on tablet.

For this purpose I have blocked back button with a pass code but still the user can press home button, multi task button, or even swipe notification bar down and go to other locations.

Up to now I am thinking of a custom ROM that allows me block or remove all this possibilities. Although may be more simple ways than a custom ROM may be available that didn't reach to my mind.

Any suggestion is welcome.

Thanks in advance. TG.

closed as off-topic by iBug, beeshyams, xavier_fakerat, GiantTree, acejavelin Dec 26 '17 at 17:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • Please note that asking for software recommendations or other off-site resources (including custom ROMs) is off-topic here. I've slightly adjusted your question to rather ask "how to achieve this". What you're looking for is kiosk-mode, so I've added that tag (you might wish to check other questions using that tag). – Izzy Dec 15 '17 at 7:34
2

The simplest way to set up kiosk-mode on Android is to use Google's Android Management API which works for any Android devices running Android 5.1 or above.

To lock the device on one app, or on multiple app, you define a kiosk policy like below, it will disable the navigation buttons (sample copied from Create a policy):

"applications": [
 {
   "packageName": "com.example.app",
   "installType": "FORCE_INSTALLED",
   "lockTaskAllowed": true,
   "defaultPermissionPolicy": "GRANT",
 },
"persistentPreferredActivities": [
  {
    "receiverActivity": "com.example.app/.com.example.app.MainActivity",
    "actions": [
      "android.intent.action.MAIN"
    ],
    "categories": [
      "android.intent.category.HOME",
      "android.intent.category.DEFAULT"
    ]
  }
]

Not the answer you're looking for? Browse other questions tagged or ask your own question.