Please provide the following:
- SDK Version: 44
- Platforms(Android/iOS/web/all): Android
I’m currently developing an app with Expo managed React Native. This app is intended to be sideloaded and used on public Android kiosks and as such, we would like to completely disable the ability of accessing both the system navigation bar as well as system status bar, so users won’t be able to accidentally or intentionally exit this app while using it. I did notice that when using expo-navigation-bar
package will allow me to hide them temporarily with the following code snippet:
// Hide system status bar
setStatusBarHidden(true, 'none');
// Hide system navigation bar on Android when not swiping from edges
NavigationBar.setPositionAsync('absolute');
NavigationBar.setVisibilityAsync('hidden');
NavigationBar.setBehaviorAsync('overlay-swipe');
NavigationBar.setBackgroundColorAsync("#0000001a"); // `rgba(0,0,0,0.1)`
but I still couldn’t figure out a way for the app to lock user from accessing them completely. Is this something that’s currently feasible with Expo managed React Native project?
Edit: I am aware that there’s a Kiosk Mode in Android where it turns the whole system to a single application container. However, I didn’t find any documentations on how to achieve it with Expo managed projects.