androidandroid-launcherkiosk-mode

Android kiosk mode and launch only one app


I am building kiosk application (Android 10) and I need to run only one app on my tablet. I want also to upload my app to PlayStore and download it.

I am reading a lot of posts as a conclusion I don't know what is the best choice.

Let me explain what I did.

  1. I implemented code that enables kiosk mode by pinning application. In this case home,back and recent buttons are inactive. As soon as I am touching one of that buttons Android OS shows the toast saying if you want to unpin the app press the recent and the back buttons together.
  2. Than I have decided to get rid of the toast that showing by OS. I found a way.
  3. I should make my app device admin. I did through the OS settings but it's not enough
  4. I should also run adb command

adb shell dpm set-active-admin --user current package_name/device_admin_receiver

and

adb shell dpm set-device-owner --user current package_name/device_admin_receiver

  1. when I am running this command everything is working perfectly but we have a problem. If I download the app from PlayStore how should I run this command on every device? No way. I should find another solution.
  2. Then I tried to find a solution to make it programmatically.
  3. When I want to make one app as a device owner it says you can do it after a factory reset without signing-in in android device (using Android account)
  4. If I do factory reset and I can't download the app from PlayStore.

It's endless loop.

What I want download app from PlayStore and make it device owner and lock app. My tablet should run only one app and the user can't press back,home, recent button to quit from app.

Is there someone that has this experience?


Solution

  • What I want download app from PlayStore and make it device owner and lock app

    That is not an option. Device owner apps are only set through a particular process at the time the phone is set up, after the initial purchase or after a factory reset. Mostly, device owner apps are for mobile device management (MDM) systems.

    My tablet should run only one app and the user can't press back,home, recent button to quit from app.

    Have the app be the launcher app.