Comments (4)
Hi @sealover06 I also use both those plugins in an app, on Android 6.0.
I have seen that it is necessary to disable temporarily the kiosk mode to let the plugin-app-update do its work (stop, update, restart). The risk is that the user could be asked to confirm again that the app must be in kiosk mode (primary launch application).
Another way could be to force stopping the app, so the update can proceed.
It happend to me that the callback event after app-update does not work, so I added a timeout to force stopping the app one minute after finding out that the app needs update.
from cordova-plugin-app-update.
from cordova-plugin-app-update.
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 !
from cordova-plugin-app-update.
@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.
from cordova-plugin-app-update.
Related Issues (20)
- my app continuosly ask for "upadate available even though is updated once in ionic 3" HOT 5
- Download Bar doesn't fill up for when downloading APK HOT 4
- CheckAppUpdate.java uses or overrides a deprecated API.
- There was a problem while parsing the package
- App Not installing automatically in android 9 HOT 8
- App crashed after download HOT 4
- Provide full api expose
- Receiving only one message from plugin
- APK Update
- Implementation with ionic-stencil
- I don't think the plugin still has active maintainers. Here's an alternative. HOT 3
- When I open the application, I got an error in console that says: HOT 2
- Don't use this plugin! HOT 10
- This plugin is a voilation against google policies, do not install this plugin HOT 2
- Does this plugin support android10? HOT 2
- Application crash while trying to update (null.appupdate.provider)
- Do you possibly support capacitor?
- FileNotFoundException
- BSF Cordova Ecosystem Crowdfunding Plan
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-app-update.