Reputation: 11
we're developing an app that runs on android tablets. The app is an DeviceOwner/Admin app (the device can be set up as COSU device if it helps) and runs in LockTaskMode (the full kiosk mode). We want to launch into the app straight after boot ideally without ever showing the android UI (we don't mind if the boot takes longer). Also we want to have an option (for admins) to exit the kiosk and get back to the normal android UI with all it's features.
We tried 2 solutions:
Implementation via the BroadcastReceiver
s onReceive()
and Intent.ACTION_BOOT_COMPLETED
. This works but launches the app after ~15 seconds, and the user is free to do whatever during that time which is not optimal.
Setting the application as the default home screen (as suggested here) which starts the application immediately after boot, but makes it impossible to exit the application and return to the normal android UI. I tried clearing the default action on the button press via mDevicePolicyManager.clearPackagePersistentPreferredActivities( mAdminComponentName,"com.example.xpms_workstation")
but it doesn't seem to work
We're developing on Flutter but this part is only for android devices
Upvotes: 0
Views: 352