Lock Android Device to a Single Application [closed] Lock Android Device to a Single Application [closed] android android

Lock Android Device to a Single Application [closed]


Lollipop (5.0) supports the concept of screen pinning, which is what I think you're after.

Android 5.0 introduces a new screen pinning API that lets you temporarily restrict users from leaving your task or being interrupted by notifications. This could be used, for example, if you are developing an education app to support high stakes assessment requirements on Android, or a single-purpose or kiosk application. Once your app activates screen pinning, users cannot see notifications, access other apps, or return to the home screen, until your app exits the mode.

There are two ways to activate screen pinning:

Manually: Users can enable screen pinning in Settings > Security > Screen Pinning, and select the tasks they want to pin by touching the green pin icon in the recents screen.

Programmatically: To activate screen pinning programmatically, call startLockTask() from your app. If the requesting app is not a device owner, the user is prompted for confirmation. A device owner app can call the setLockTaskPackages() method to enable apps to be pinnable without the user confirmation step.

https://developer.android.com/about/versions/android-5.0.html


There are several different possible solutions for this problem which are mentioned below, but there is no "out of the box" solution implemented in Android. (Edit: At least not before Android 5.0)

  • Develop your application and activate it as standard Home Screen App/ Launcher. Users could only avoid this solution by booting in safe mode.
  • Develop your own kernel (as mentioned by Chloe at the comments)
  • Use a 3rd party application for this case. (This will mostly require root on your device) Different solutions are available at the Play Store (e.g. KioWare or SureLock). Search for Android Kiosk Mode to get more results.


Starting Android 6.0, you can configure device policies for Corporate Owned Single Use (COSU) devices, which is an addition to what @Mark Melling pointed out.

As an IT administrator, you can configure Android 6.0 Marshmallow and later devices as corporate-owned, single-use (COSU) devices. These are Android devices used for a single purpose, such as digital signage, ticket printing, point of sale, or inventory management. To use Android devices as COSU devices, you need to develop Android apps that your customers can manage.

Your customers can configure COSU devices:

To lock a single application to the screen, and hide the Home and Recents buttons to prevent users from escaping the app. To allow multiple applications to appear on the screen, such as a library kiosk with a catalog app and web browser.

http://developer.android.com/training/enterprise/cosu.html