Skip to content

CordovaCn/cordova-plugin-app-update

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cordova-plugin-app-update

App updater for Cordova/PhoneGap

Demo

Try it yourself:

Just clone and install this demo. cordova-plugin-app-update-DEMO 🎉

Preview

enter image description here

enter image description here

Install

Latest published version on npm (with Cordova CLI >= 5.0.0)

cordova plugin add cordova-plugin-app-update

Usage

  • Simple:
var updateUrl = "http://192.168.0.1/version.xml";
window.AppUpdate.checkAppUpdate(onSuccess, onFail, updateUrl);
  • Verbose
var appUpdate = cordova.require('cordova-plugin-app-update.AppUpdate');
var updateUrl = "http://192.168.0.1/version.xml";
appUpdate.checkAppUpdate(onSuccess, onFail, updateUrl);

versionCode

You can simply get the versionCode from typing those code in Console

var versionCode = AppVersion.build
console.log(versionCode)  // 302048
versionName versionCode
0.0.1 18
0.3.4 3048
3.2.4 302048
12.234.221 1436218

server version.xml file

<update>
    <version>302048</version>
    <name>name</name>
    <url>http://192.168.0.1/android.apk</url>
</update>

Platforms

Android only

License

MIT

❄️ 🍻

  • Please let me know if you have any questions.

  • Support me a Star if it is necessary. 👍

About

App updater for Cordova/PhoneGap

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 99.2%
  • JavaScript 0.8%