

How to Create a Working Kiosk Mode in Android - andreas-schrade
http://www.andreas-schrade.de/2015/02/16/android-tutorial-how-to-create-a-kiosk-mode-in-android/

======
nroets
I use a few of these hacks. But I wanted to be 100% sure the user could not
open certain builtin apps, like the phone app. So my kiosk device is locked
and my app runs on top of the lock screen.

My target device is Android 2.3. Does anyone need to see some code?

~~~
ghoul2
yes, please!

~~~
nroets
[https://github.com/nroets/EVisitorBook](https://github.com/nroets/EVisitorBook)

------
mik3y
Last I looked into this, it seemed that masquerading as a custom launcher was
the way to go. Any reason to avoid this technique?

Aside: As a long time Android hacker, it pains me to see iOS seems to do this
better with "Guided Access" mode. Just look at the variety of apps which use
it: Square Register, Envoy, etc.. Sorta sad it's not an Android platform
feature by now.

~~~
estel
There's the new Screen Pinning feature in Android 5. It's not /quite/ the same
thing, but it's definitely possible to use it as a kiosk mode thing.

~~~
andreas-schrade
Yes, you are right! But, you know, it is Android 5. It has a market share of
1.6%. We can talk about this cool new feature in ~3 years, when everybody has
Android 5+ ;-)

~~~
rtpg
if you're setting up a kiosk, you'll need to get a new model anyways.

~~~
rsynnott
You're probably getting something cheapish, though, which almost certainly
won't have Android 5.0, and will likely _never_ have it.

~~~
kiwidrew
Not necessarily true, you can often get an older Nexus device quite cheaply
and then upgrade the OS. That's how I got my hands on Android 5.0 -- and it
really transformed an old and tired phone into something new and marvelous.

------
asciimo
> Exit mechanism: Don't forget to implement and test an exit mechanism in your
> app.

We locked our kiosks in a frame that disallowed hitting menu buttons. To
escape from the app without unlocking the frame, I implemented a "magic menu,"
consisting of three invisible buttons in the corners of the app. They would
launch an admin menu if they were hit in the correct sequence within the
correct amount of time.

------
simonhorlick
Nice writeup. I had to do most of those things for my startup. I replaced the
home screen in its entirety so there's no way to escape our app at all. If we
need to administer it at all there's ssh installed. I just spent today
building logstash-forwarder into the image so we can view logs from all
devices in real-time.

~~~
andreasschrade
That is a good idea to install a ssh server on such devices! Also the
logstash-forwarder is a pretty genius idea! Thanks for sharing this.

------
on_and_off
I did not give Kiosk a lot of thought (it is not my use-case), but Lollipop's
Screen Pinning feature looks like a good fit to me.

------
saganus
Very interesting workarounds!

