-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download Again / Install Manually when run with the Kiosk cordova plugin #136
Comments
Hi @sealover06 I also use both those plugins in an app, on Android 6.0. |
Thank you so much @carlo318, let me test this asap. Stay tuned !
|
Well, I'm not sure that I can deal with cordova-plugin-kiosk. the KioskPlugin.exitKiosk() function leads to a popup "Select destination Launcher3 / myApp" I'm looking for full automation here with no user click... @vaenow, please any thoughts on the compatibility of your great app-update plugin with a kiosk plugin ? thank you so much in advance. @carlo318, may you share your code for "a timeout to force stopping the app one minute after finding out that the app needs update" ? thank you ! |
@sealover06 this is my example code, forcing Exit App and Stop Kiosk mode after 30sec: var updateUrl = "https://myserver.com/version.xml"; // Get xml from server $http.get(updateUrl, {}).success(function(xmlData, status) { // Check if App needs update by reading xml info if ($(xmlData).find('version').text() > window.localStorage['appVersionCode']) { // New version available: try to update window.AppUpdate.checkAppUpdate(function(result) { // Success }, function(err) { // Fail window.localStorage["Reboot"]="0"; }, updateUrl, { 'skipPromptDialog' : true, 'skipProgressDialog' : true }); $rootScope.NeedUpdate = true; // After 30 seconds disable Kiosk and Close App to allow autoUpdate $timeout(function() { Kiosk.setKioskEnabled(false); navigator.app.exitApp(); }, 30000); window.localStorage["Reboot"]="1"; //Reboot at next App start } else { // App is up-to-date console.log('App is Up-to-date'); } }).error(function(data, status, headers, config) { console.log('CheckAppUpdate XML err: '+ data); }); It only work with "mild" kiosk mode: cordova-plugin-kiosk-launcher Hope it helps. |
Hello Vaenow and team. Let me start: this plugin is awesome. Works like a charm.
I can just see 1 issue when run as well with the kiosk plugin.
and this case and only this case, I get a Download Again / Install Manually popup that is stuck on the screen.
From similar issues, I've seen that a way to fix this was to add
uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" in the AndroidManifest.xml
But I've checked, and yes, I have already this line...
uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
uses-permission
android:name="android.permission.REQUEST_INSTALL_PACKAGES"
uses-permission
android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
uses-permission
android:name="android.permission.REORDER_TASKS"
uses-permission
android:name="android.permission.SYSTEM_ALERT_WINDOW"
Omitted the tags since interpreted by the editor.
My Tablet runs android 6.0.1
Thanks for help, I really need both plugin to work together. Thanks a lot in advance, Cheers, Denys
The text was updated successfully, but these errors were encountered: