Setting up the Kiosk mode
If you want a user to interact with your application and nothing else, you can configure the virtual device so that it turns into a kiosk mode, making it a single-purpose tool.
Locking an application
- Connect to your virtual device via SSH, as explained in section Accessing a Genymotion virtual device from SSH.
- Start the application you want to lock in kiosk mode.
- Once the application is started, run
cmd activity kiosk start.
The status bar is hidden and cannot be scrolled down. The user cannot use the Back or Home buttons.
Unlocking an application
To unlock an application and disable the kiosk mode, run
cmd activity kiosk stop. You can now exit the application. If you reboot your device, your application will still be locked.
If within your application you start another application, this might not work depending on how this application is started. For more information, please refer to the LockTask mode from Android DeviceOwner APIs.