I am writing Android application for kiosk mode. I am using this tutorial to create kiosk mode: http://www.andreas-schrade.de/2015/02/16/android-tutorial-how-to-create-a-kiosk-mode-in-android/
However, in the tutorial, the user still can click on home and then the application back after 2 seconds.
So, I did a bit of modification to disable the home button by making my application as a home. I did it by put this in my manifest:
<activity android:name=".MainActivity"
android:launchMode="singleInstance">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME"/>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Everything work well. But when the user try to exit (ie. user login as administrator), my application is back again. I suspect because I set it as HOME.
My question is, how to allow my app to Exit. Is it possible to go back to actual home when my app exit? If not, is there a better way to tackle this home problem (ie. disable home button and not actually set it as home)?