Kiosk Mode: No automatic offline exit — use Android Intent to launch Esper Wi-Fi Settings directly
Android
When a device running Esper Kiosk Mode loses Wi-Fi connectivity, the device is locked to the kiosk application with no built-in way for a technician to reach Wi-Fi settings and restore the connection.
Why this happens
Esper Kiosk Mode suppresses the Android system UI, including the notification shade and Settings app, to prevent end users from leaving the kiosk application. Although Kiosk Mode includes a hidden dock accessible by tapping the top-right corner repeatedly, this shortcut is unreliable when the device is offline. The most robust solution is to embed a direct Android Intent inside your kiosk application that launches the Esper Wi-Fi Settings activity on demand.
Before you begin: This solution requires access to the source code of your kiosk application. If you are using a third-party kiosk app you cannot modify, contact Esper Support as described at the end of this article.
Steps
-
Add the Wi-Fi Settings Intent to your kiosk application source code.
In your kiosk application, create a function that launches the Esper Wi-Fi Settings activity directly. The Esper Agent exposes this activity through a named component, bypassing the suppressed system UI entirely.
Note: The package namefun launchEsperWifiSettings() { val intent = Intent() intent.component = ComponentName( "com.shoonyaos.shoonyasettings", "com.shoonyaos.shoonyasettings.activities.MainActivity" ) startActivity(intent) }com.shoonyaos.shoonyasettingsand activity class name may vary depending on your Esper Agent version or OEM build. Confirm these values against your specific Esper Agent build before deploying to production devices. -
Add a visible button or menu option to your kiosk application UI.
Wire the function from Step 1 to a UI element that technicians can locate quickly during a connectivity outage. Recommended practices:- Label the button clearly, for example Wi-Fi Settings.
- Optionally protect it with a PIN or long-press gesture to prevent accidental activation by end users.
- Position it somewhere accessible to field technicians but not prominent to end users.
-
Build and upload the updated APK to the Esper Console.
Navigate to Apps & Configuration → Apps, select your kiosk application, and upload the new APK as a new version. Incrementing the version code ensures the Console recognises it as an update. -
Deploy the updated application to your devices.
Choose the deployment method that matches your setup:- Direct device or group deployment: In Apps & Configuration → Apps, select the new version and push it to the target device or group.
- Blueprint-based deployment: Navigate to Blueprints → [Blueprint Name] → Apps, select Update Version for your kiosk app, choose the new APK version, then select Save & Publish. Devices assigned to the blueprint will receive the update automatically.
-
Test the button on an offline device before rolling out to the fleet.
On a test device:- Disable Wi-Fi to simulate a connectivity loss.
- Tap the Wi-Fi Settings button inside your kiosk application.
- Confirm the Esper Wi-Fi Settings screen launches successfully.
- Reconnect to Wi-Fi and confirm the device remains in Kiosk Mode without breaking enforcement.
Verify: The Esper Wi-Fi Settings screen opens from within the kiosk application while the device is offline, Wi-Fi can be re-enabled from that screen, and the device returns to the kiosk application in Kiosk Mode with all restrictions intact. The device should never exit Kiosk Mode as part of this flow.
If this doesn't resolve it
If the Intent fires but the Wi-Fi Settings activity does not launch, collect the following before contacting support:
- The Esper Agent version installed on the device (visible in Devices & Groups → [Device Name] → Device Info).
- The device make, model, and Android version.
- The exact package name and class name you used in the Intent.
- A logcat output captured at the moment the button is tapped, filtered by your kiosk application's package name.
If you are using a third-party kiosk application whose source code you cannot modify, the Intent approach is not available. Contact Esper Support with your device details and use case so the team can advise on alternative approaches for your configuration.
Still need help?
If you're unable to access Wi-Fi settings through the Intent or are experiencing issues with offline mode exit in Kiosk Mode, please submit a support ticket with details about your Intent implementation, device model, and Android version.
Please sign in to leave a comment.
Comments
0 comments