{"id":14985799,"url":"https://github.com/vaenow/cordova-plugin-app-update","last_synced_at":"2025-05-16T15:09:49.408Z","repository":{"id":57207799,"uuid":"45228329","full_name":"vaenow/cordova-plugin-app-update","owner":"vaenow","description":"App updater for Cordova/PhoneGap","archived":false,"fork":false,"pushed_at":"2023-11-15T07:21:05.000Z","size":198,"stargazers_count":299,"open_issues_count":39,"forks_count":146,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-30T09:05:19.155Z","etag":null,"topics":["android","app-update","cordova-plugin","ionic","update"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vaenow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-10-30T04:03:47.000Z","updated_at":"2025-03-17T02:32:46.000Z","dependencies_parsed_at":"2023-11-29T00:41:41.651Z","dependency_job_id":"7947eedc-1881-49de-b565-39a346a1f5ed","html_url":"https://github.com/vaenow/cordova-plugin-app-update","commit_stats":{"total_commits":167,"total_committers":26,"mean_commits":6.423076923076923,"dds":0.5329341317365269,"last_synced_commit":"2fe6973a597f0fda10c40401f133e4bbc4905b60"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaenow%2Fcordova-plugin-app-update","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaenow%2Fcordova-plugin-app-update/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaenow%2Fcordova-plugin-app-update/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaenow%2Fcordova-plugin-app-update/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vaenow","download_url":"https://codeload.github.com/vaenow/cordova-plugin-app-update/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253528941,"owners_count":21922631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","app-update","cordova-plugin","ionic","update"],"created_at":"2024-09-24T14:11:41.850Z","updated_at":"2025-05-16T15:09:44.401Z","avatar_url":"https://github.com/vaenow.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n![travis](https://travis-ci.org/vaenow/cordova-plugin-app-update.svg?branch=master)  \n\n[![NPM](https://nodei.co/npm/cordova-plugin-app-update.png?downloads=true\u0026downloadRank=true)](https://nodei.co/npm/cordova-plugin-app-update/)\n\n# cordova-plugin-app-update\nApp updater for Cordova/PhoneGap\n\n# Demo \nTry it yourself:\n\nJust clone and install this demo.\n[cordova-plugin-app-update-DEMO](https://github.com/vaenow/cordova-plugin-app-update-demo)\n:tada:\n\n * 如果喜欢它，请别忘了给我一颗鼓励的星\n * Support me a `Star` if it is necessary.  :+1:\n \n# Preview\n![enter image description here](https://raw.githubusercontent.com/vaenow/cordova-plugin-app-update/master/res/img/Screenshot_2015-10-31-13-42-13.jpg)\n\n# \n\n![enter image description here](https://raw.githubusercontent.com/vaenow/cordova-plugin-app-update/master/res/img/Screenshot_2015-10-31-13-42-19.jpg)\n\n# Install\n\n### Latest published version on npm (with Cordova CLI \u003e= 5.0.0) \n\n\u003e `\"cordova-android\": \"6.3.0\"`\n\n`cordova plugin add cordova-plugin-app-update --save`\n\n# Usage\n\n- Simple:\n```js\nvar updateUrl = \"http://192.168.0.1/version.xml\";\nwindow.AppUpdate.checkAppUpdate(onSuccess, onFail, updateUrl);\n```\n\n- Verbose\n```js\nvar appUpdate = cordova.require('cordova-plugin-app-update.AppUpdate');\nvar updateUrl = \"http://192.168.0.1/version.xml\";\nappUpdate.checkAppUpdate(onSuccess, onFail, updateUrl);\n```\n\n- Auth download  [MORE](https://github.com/vaenow/cordova-plugin-app-update/pull/62)\n```js\nappUpdate.checkAppUpdate(onSuccess, onFail, updateUrl, {\n    'authType' : 'basic',\n    'username' : 'test',\n    'password' : 'test'\n})\n```\n\n- Skip dialog boxes\n```js\nappUpdate.checkAppUpdate(onSuccess, onFail, updateUrl, {\n    'skipPromptDialog' : true,\n    'skipProgressDialog' : true\n})\n```\n\n### versionCode\n\nYou can simply get the versionCode from typing those code in `Console`\n\n```js\nvar versionCode = AppVersion.build\nconsole.log(versionCode)  // 302048\n```\n\n\nversionName | versionCode\n------- | ----------------\n0.0.1  | 18\n0.3.4  | 3048  \n3.2.4   | 302048\n12.234.221  | 1436218\n\n### server version.xml file\n \n```xml\n\u003cupdate\u003e\n    \u003cversion\u003e302048\u003c/version\u003e\n    \u003cname\u003ename\u003c/name\u003e\n    \u003curl\u003ehttp://192.168.0.1/android.apk\u003c/url\u003e\n\u003c/update\u003e\n```\n\n### `checkAppUpdate` code\n\n```java\n    /**\n     * 对比版本号\n     */\n    int VERSION_NEED_UPDATE = 201; //检查到需要更新； need update\n    int VERSION_UP_TO_UPDATE = 202; //软件是不需要更新；version up to date\n    int VERSION_UPDATING = 203; //软件正在更新；version is updating\n\n    /**\n     * 版本解析错误\n     */\n    int VERSION_RESOLVE_FAIL = 301; //版本文件解析错误 version-xml file resolve fail\n    int VERSION_COMPARE_FAIL = 302; //版本文件对比错误 version-xml file compare fail\n\n    /**\n     * 网络错误\n     */\n    int REMOTE_FILE_NOT_FOUND = 404;\n    int NETWORK_ERROR = 405;\n\n    /**\n     * 没有相应的方法\n     */\n    int NO_SUCH_METHOD = 501;\n\n    /**\n     * Permissions\n     */\n    int PERMISSION_DENIED = 601;\n\n    /**\n     * 未知错误\n     */\n    int UNKNOWN_ERROR = 901;\n```\n# Languages\n* 🇨🇳 zh\n* 🇺🇸 en \n* 🇩🇪 de \n* 🇫🇷 fr \n* 🇵🇹 pt \n* 🇧🇩 bn \n* 🇵🇱 pl \n* 🇮🇹 it \n* 🇪🇸 es\n* 🇷🇺 ru\n* 🇰🇷 ko\n\n# Platforms\nAndroid only\n\n# License\nMIT\n\n# :snowflake: :beers:\n\n* Please let me know if you have any questions.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaenow%2Fcordova-plugin-app-update","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaenow%2Fcordova-plugin-app-update","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaenow%2Fcordova-plugin-app-update/lists"}