Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent users from closing or minimizing an android app

Tags:

java

android

I have an android app where the client will be let two tablets for experiments.

The question is: Is possible to prevent users from minimizing or closing the app? How can I do that?

like image 301
Mayke Ferreira Avatar asked Dec 20 '14 00:12

Mayke Ferreira


People also ask

How do I lock an app from being closed?

Go to the Recents page (swipe up and hold if using gesture navigation, or tap the III button if you're using navigation buttons). Tap the app icon above the app preview/card. Tap Lock this app.


1 Answers

Kiosk mode is what you are looking for! It was introduced in Android 4.2.

To enable kiosk mode, set this in your activity_main.xml:

<intent-filter>
<category android:name="android.intent.category.HOME" /> 
</intent-filter>

This question is most likely a dupe of: Develop app run in kiosk mode in android

like image 74
Simon Cedergren Malmqvist Avatar answered Sep 30 '22 05:09

Simon Cedergren Malmqvist