Search code examples
androidunity-game-enginekioskkiosk-mode

Is screen pinning actually enough to set up an unmanned kiosk of a unity game?


I have been trying to using android screen pinning to achieve a behaviour that would allow my unity game to be run at an unmanned kiosk. The default behaviour works fine, you cant quit the application without the PIN.

However, everytime someone brings up the navigation, they get a toast message about how to undo screen pinning. Following that instruction will open up the pin lock screen, without any way to actually get back to the app. Your only option is to enter the pin.

I have considered the following solutions:

  1. Disabling the navigation bar, or at the very least the toast message
  2. Somehow returning from the PIN screen to the application
  3. Physically covering the navigation bar area at the kiosk

For 1) I looked into immersive mode, but that only seems to make it more involved on bringing up the navigation. The screen pinning options and developer options on android don't seem to include any way to change the behaviour, navigation bar, or toast message.

For 2) I am completely stumped, I would have expected this to be a standard feature, yet I couldn't figure out a way to make it happen. This would be by far the easiest solution, too.

Now 3) of course would be an acceptable solution, but would also me involve delegating this problem, which I am not a huge fan of.

I have also looked into this article about the drawbacks of android screen pinning and considered writing a small app using googles pinning API to launch my unity project and pin it, and setting it as device owner, as that is the only way mentioned to disable the toast message. However, right now I am a bit overwhelmend with my inexperience in this area and could use some direction. Have I missed anything obvious?

I have been testing on an android 7.0 tablet, using unity version 2019.3.0f6.


Solution

  • After a bit of research I concluded that android screen pinning is insufficient for an unmanned kiosk and installed Fully Single App Kiosk.

    Since I only needed to lock one device, it was more than sufficient. Comes with a free testing version too.