Latest News
Senin, 15 Oktober 2018

auto update cordova apk

Cara Auto update apk cordova:

Google Drive

$.ajax({
url:'www.example.com/check_for_update.php?action=update',
success:function(data){
   if(data){
   //update is avaliable
   $('#updatediv').show();
  }else{
  //no update avaliable
  $('#updatediv').hide();
}

});
if(isset($_GET['action'])=='update'){

//if update avaliable set $isUpdate to true
//default value is false
$isUpdate=false;
echo $isUpdate;

}
<div id="updatediv">
  <button on-click="window.location.href = "http://play.google.com/store/apps/details?id=com.appName">Update</button>
</div>

Google PlayStore

cordova plugin add org.apache.cordova.inappbrowser
window.open('http://play.google.com/store/apps/details?id=com.appName',"_system");
or
function do_update(){
    window.location.replace('market://details?id=com.appName');
}

<input type="button" id="btnUpdate" value="Update" onclick="do_update();"/>
sumbernya :

https://stackoverflow.com/questions/27657642/check-for-update-on-google-play-for-particular-application-in-phone-gap-android.

https://www.sitereq.com/post/3-steps-to-autoupgrade-phonegap-android-apps-apk

  • Blogger Comments
  • Facebook Comments

0 komentar:

Posting Komentar

Item Reviewed: auto update cordova apk Rating: 5 Reviewed By: aries