thaarok / cordova-plugin-kiosk

Cordova plugin to use Cordova application "in kiosk mode" and as Android launcher
Apache License 2.0
142 stars 101 forks source link

Set this application as Launcher #76

Closed JoseGeorges8 closed 5 years ago

JoseGeorges8 commented 5 years ago

On the readme it says

To has it working, user have to set this application as launcher (see below) and start it by pressing Home button or by restarting the device.

However I don't see any explanation on how to set this application as launcher, I've been trying to research but I'm clueless, could anybody point me to the right path? Thanks!

thaarok commented 5 years ago

As mentioned in README.md, there are different steps for different phones, however:

Alcatel / older Android: Settings - Applications - All - (This Application) / Launcher - Clear defaults, after Home press will be asked for default to set

Xiaomi / newer Android: Settings - Installed apps - Defaults - Launcher

rathodkaran07 commented 4 years ago

Is there anyway we can set the application as launcher programatically? something like KioskPlugin.setAsLauncher(); and this will set the application to default launcher. It should ask the user to choose launcher only after user executes KioskPlugin.exitKiosk();

thaarok commented 4 years ago

It is not possible to change default lancher from the regular Android app (from security reason), however it seems it should be possible to configure it through ADB (USB debug), if it will help you:

adb shell cmd package set-home-activity "package/activity"
adb reboot

https://stackoverflow.com/questions/14816780/can-i-use-adb-to-change-the-default-launcher-program