Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Not Working After shutdown or restart #62

Open
profitable opened this issue Sep 1, 2018 · 3 comments
Open

Not Working After shutdown or restart #62

profitable opened this issue Sep 1, 2018 · 3 comments

Comments

@profitable
Copy link

Everything works correctly before restarting or shutting down the phone. When I restart the phone or shutdown and turn on again, it shows me a dialog which asks me to "Select a Home app" and shows two options "Huawei Home" & "CordovaKioskDemo", when I choose "Huawei Home" it works, but which I choose "CordovaKioskDemo" it shows a black screen and then asks me again to "Select a Home app" and keeps on doing the same. So if I choose "Huawei Home" and go to settings I can see that the Default Home App is set to "none", although I have set it before to "CordovaKioskDemo". And if I set it again to "CordovaKioskDemo" and open "CordovaKioskDemo", it shows a black screen and close the app. Could you please help me figure out the issue. I am testing it on HUAWEI Y5 Prime 2018 Android 8.1.0 if that helps. BTW, it works properly on Android version 5.0.1 on GT-I9500 samsung device.

@thaarok
Copy link
Owner

thaarok commented Sep 1, 2018

Does Chrome debugging show some error message? ( https://developer.chrome.com/devtools/docs/remote-debugging )
Does Logcat show some useful error message? ( $ANDROID_HOME/platform-tools/adb logcat )

@profitable
Copy link
Author

Hello,
Chrome debugging is not showing anything. Logcat shows the following:

09-04 13:07:24.825 24007 24007 D AndroidRuntime: Shutting down VM
09-04 13:07:24.835 24007 24007 E AndroidRuntime: FATAL EXCEPTION: main
09-04 13:07:24.835 24007 24007 E AndroidRuntime: Process: pk.capripio.backgroundtasks, PID: 24007
09-04 13:07:24.835 24007 24007 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{pk.capripio.backgroundtasks/jk.cordova.plugin.kiosk.KioskActivity}: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@b94dc9d -- permission denied for window type 2010

I tried adding permission for android.permission.SYSTEM_ALERT_WINDOW, but it's still the same, any clue?

@profitable
Copy link
Author

I am using version 2.0 now https://github.com/hkalina/cordova-plugin-kiosk/tree/v2.0 which seems to work unlike the latest version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants