0

I want to make an android app that runs as the only app on the android device. If the unit is reset I want this app to start up and run.

The reason for this is we are going to be buying these special 7 inch wall mounted tablets which have android OS on them (here is a link to the device: http://www.geekland.co/7-Android-42-Panel-PC-Wall-or-Desk-Mounted-Tablet-with-RJ45-GK-Q896.htm). And we are going to be programming an app that does various things.

However, it is imperative that the app cannot be exited and that if the system restarts, that app is what runs. We don't want random people messing with the device. We want to restrict everything just to that app.

Of course, maybe with an admin password you would be able to exit the app.

Can this be done somehow within an android app? Or does this call for, I don't know, making some new android OS clone or something? (something I'm not sure of how to do).

Loctor
  • 55
  • 7
  • you are going to need a custom ROM, no way around it – tyczj Apr 10 '15 at 14:49
  • @tyczj Thank you for the advice. I will look into how to create a custom android ROM and how to install it. – Loctor Apr 10 '15 at 14:51
  • Uninstall everything but your app. Set up a script in the init folder which launches your app – Phantômaxx Apr 10 '15 at 14:52
  • You could make a custom Launcher. That should give pretty full control over what a user can do. – QuinnG Apr 10 '15 at 14:52
  • I don't think he needs a custom rom, he an overwrite the back and home button http://stackoverflow.com/questions/5547818/can-i-override-the-home-button-in-my-application http://stackoverflow.com/questions/4969541/override-back-button-in-android and also make a wake broadcast receiver that init the app when the device start https://developer.android.com/reference/android/support/v4/content/WakefulBroadcastReceiver.html – Chris Gomez Apr 10 '15 at 14:52
  • 2
    @cgomezmendez you cannot override the home button – tyczj Apr 10 '15 at 14:53
  • oh sorry, you are right is not working any more since 4.0 @tyczj – Chris Gomez Apr 10 '15 at 14:55
  • @tyczj are custom roms hard to make? I mean if you know how to make android apps that is. (dumb question but just want your insight since you seem to know) – Loctor Apr 10 '15 at 14:59
  • also there is this, but only 5.0 > over http://stackoverflow.com/questions/2068084/kiosk-mode-in-android/24540023#24540023 – Chris Gomez Apr 10 '15 at 15:00
  • @AcroR I have no idea what is involved in making a ROM – tyczj Apr 10 '15 at 15:01
  • @AcroR Check this, they have a working code that do exactly what you want http://www.andreas-schrade.de/2015/02/16/android-tutorial-how-to-create-a-kiosk-mode-in-android/ – Chris Gomez Apr 10 '15 at 15:04

2 Answers2

0

As I know there are few ways to do this.

  1. Override buttons as in here
  2. Write a home screen application as in here
  3. Lock apps using apps similar to AppLock some can even lock system apps and settings
M at
  • 1,020
  • 1
  • 12
  • 26
0

If the devices are running Lollipop or newer, you can do this with the Task Locking API. First you need to make your app (or some other app) the device owner and grant your app the lock task permission so that locking can be done without user confirmation. Then just add a receiver in your manifest for the BOOT_COMPLETED intent and lock the task when the app starts.

I wrote an open source app that acts as the device owner and simplifies granting lock task permission to your own apps.

Kevin Krumwiede
  • 9,868
  • 4
  • 34
  • 82