Cara Auto update apk cordova:
Google Drive
Google PlayStore
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
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');
}
sumbernya :<input type="button" id="btnUpdate" value="Update" onclick="do_update();"/>
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
0 komentar:
Posting Komentar