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

brick mode #39

Closed JPedroBorges closed 6 years ago

JPedroBorges commented 6 years ago

Hello,

I've set up kiosk mode. All fine. I added a button so the user can leave the app and go somewhere else. It works just fine, but it goes to a page that says: Click any button to begin...

So, i wanted to leave the app, not to go to another screen that brings me back to the app again.

How can I overwrite this?

Thanks in advance.

thaarok commented 6 years ago

Please specify how did you add the button to leave the app. Sounds you are starting HomeActivity instead...

JPedroBorges commented 6 years ago

thank you for the fast reply.

I've just created a standard button with navigator.app.exitApp(); KioskPlugin.exitKiosk();

It's my first Cordova application, not really into it yet. I've just added the plugin, and added the code to the button. How could i avoid the HomeActivity then?

thaarok commented 6 years ago

Dont combine this two operations - they does not work this way. When kiosk mode is used, app is set as launcher of the device - if you try to exit it, it will be re-launched, as homescreen of the device - to start usual homescreen use KioskPlugin.exitKiosk();

JPedroBorges commented 6 years ago

Ok, it's better now. Once i install it, it works fine. It is in Kiosk mode. If i press to close the app it shows up the selector and it just closes nicely.

On the second run if i dont set as launcher, it works as a standard app, as one would expect. but if i set as Launcher and open the app, when i press to exit, it shows up the selector selector but when i press my system Launcher, nothing happens. it stays on the app. Any idea?

thaarok commented 6 years ago

when i press my system Launcher, nothing happens. it stays on the app.

this should start your launcher correctly - can you provide more info? (logs, android version, what is different against situation it start your launcher correctly?)

Once i install it, it works fine. It is in Kiosk mode.

are you sure you are in kiosk mode after installation? app should be started as non-kiosk app after app installation - setting as launcher by user should be required