简体   繁体   中英

Android forgets/resets default launcher when default launcher crashes

We are developing a kiosk application that will be hosting an Android WebView. This kiosk application is installed on a Android tablet as default launcher so when the tablet starts up the kiosk application immediately takes control and uses screen pinning to lock the user out of the "normal" android OS. However one of the webpages we run in the kiosk application can sometimes cause the kiosk application to crash/be shutdown by the Android OS due to a bug (some recursive loop that consumes all heap memory). When this happens the kiosk application crashes/is killed and for some reason Android resets the default launcher settings. So if the Android tablet is rebooted at this stage the kiosk application is no longer the default launcher and isn't started immediately at start up.

Is there anyway to prevent Android for resetting the default launcher?

May be you can create a lightweight app Launcher which can no way crash and then launch your KioskApp after app Launcher is launched everytime. So even if your KioskApp is crashed your app Launcher is always there and it will immediately launch your kiosk App again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM