Is Permanent App Kiosk Mode possible in Android/React-Native?

My client wants me to make the app permanently in kiosk mode so that it cannot be exited unless the device is rebooted. I’ve tried react-native npm packages that implement a kiosk mode but they simply do the app pinning feature which can easily be bypassed by pressing the home and power button at the same time.

I want to know if such is a permanent locking feature is even possible? If not can someone kindly confirm so I may let my client know. If there are any solutions please do share.

I tried the react-native-kiosk and react-native-kiosk-mode and react-native-lock-task packages they all did the same thing. App pinning which could be bypassed.

Implementing a true permanent kiosk mode on Android can be a challenge, especially when using React Native, as the platform doesn’t inherently provide full access to lower-level device management features. Here are some important considerations:

1. Kiosk Mode Overview

Android does offer a “kiosk mode” via Device Owner and Managed Device features, typically utilized in enterprise settings. This mode can restrict the device to a single app, preventing users from exiting it without a device reboot.

2. Device Owner Mode

To implement true kiosk mode, you’ll generally need to:

  • Set the device as a Device Owner. This usually requires an NFC bump or a factory reset to establish the app as the owner.
  • Use the Device Administration API to lock the app in kiosk mode.

3. React Native Limitations

The existing React Native packages (like react-native-kiosk and react-native-lock-task) primarily utilize app pinning, which is not secure against bypassing methods like the home button.

4. Possible Solutions

  • Native Code Implementation: To achieve true kiosk mode, consider writing custom native modules in Java/Kotlin (for Android) to manage device policies directly. This could allow you to enforce kiosk mode more robustly.
  • Third-party Solutions: There are enterprise mobility management (EMM) solutions (like VMware, Microsoft Intune) that can enforce kiosk mode without user bypassing.
  • Custom Launcher: Create a custom launcher app that acts as a kiosk, effectively locking the user into a specified app interface.

5. Limitations & Considerations

  • User Experience: Users won’t have access to the usual Android features, which may cause issues.
  • Device Compatibility: Not all devices support device owner mode, especially if they are not designed for enterprise use.
  • Testing: Always test extensively on target devices, as behavior can differ between Android versions.