globostore-autoupdate-plugin
v1.0.10
Published
Globostore AutoUpdate Plugin
Downloads
3
Maintainers
Readme
cordova-globostore-autoupdate
A library which provides auto-update feature to any hibrid (Android and IOS) cordova application from globostore.
Installation
Add the plugin to your cordova project:
$ cordova plugin add globostore-autoupdate-plugin
In config.xml add this lines:
<preference name="appId" value="<< your_app_id >>" />
<preference name="appKey" value="<< your_app_key >>" />
<preference name="versionUrl" value="https://services.apps.tvglobo.com.br/rpc" />
<preference name="method" value="CrudService.GetCurrentAppVersion" />
<preference name="service" value="crud" />
<preference name="downloadUrl" value="https://download.globostore.apps.tvglobo.com.br" />
Where app_id
and app_key
is provided by globostore to your application when it is registered.
Run the auto-update feature when your application is loaded, for example, in index.html:
<script type="text/javascript">
function onLoad() {
document.addEventListener('deviceready', onDeviceReady, false);
}
function onDeviceReady() {
window.GlobostoreAutoUpdate.check('version', function () {})
}
</script>
<body onload="onLoad()">
<-- your project src code -->
</body>