Android Application Update for Cordova r1.0.0
Android Application Update is a cordova plugin allow users to check for updates on playstore
Using with cordova:
Appupdate< featuer >url callback_handler error_handler; { //your code goes here } { //your error handler goes here }
Using with ionic:
<any>windowAppupdate< featuer >url callback_handler error_handler; { //your code goes here }
Features:
Checking for update
; { //your code goes here } { //your error handler goes here }
Server side implementation:
1- Response body:
2- PHP Example:
<?PHP $app_data = ["version"=>2, "update-flag"=>false]; echo json_encode($app_data); ?>
Exmaple
var update_state = false; //Application initialization { ifupdate_state == true AppUpdate; } //Application back to foreground { ifupdate_state == true AppUpdate; }{ //Save update state update_state = state; }; { //your error handler goes here };
How to install
cordova plugin add android-application-update