Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lock Android Device to a Single Application [closed]

My company is looking at selling an Android device with an application on that will do a certain task as a product to replace an embedded device.

However we need to some how lock the device to only have access to our application which we will develop and not be able to access the normal Android OS interface.

I would like the following:

  1. When the device boots it must automatically load our application
  2. There must be no way to exit the application, (unless if we maybe enter a master password) which will allows you access to the device

Is this possible to do, and how would one go about doing this?

like image 728
Zapnologica Avatar asked Jun 09 '14 19:06

Zapnologica


People also ask

Can you lock your phone on one app?

Screen Pinning feature is built into the Android OS which locks the smartphone to a particular app and won't exits till you put in your passcode. This feature works on almost every Android smartphone running Android 7.0 Nougat and later.

Can you lock Android on an app?

App Lock, free in the Android Market, allows you to set a lock code or pattern on an app-by-app basis, preventing unwanted access to any app you deem private. Setting up and using App Lock is a breeze. After installing and opening the app for the first time, you'll be asked to set a lock code.


1 Answers

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

like image 114
Mark Melling Avatar answered Sep 22 '22 16:09

Mark Melling