forked from post2000/androidUpdatePlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jiangwei
committed
Oct 23, 2015
1 parent
9765a0d
commit 8800e4a
Showing
8 changed files
with
341 additions
and
371 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Android auto update plugin for Phonegap/Cordova 1.0.0 # | ||
|
||
|
||
## Adding the Plugin to your project ## | ||
|
||
The plugin conforms to the Cordova plugin specification, it can be installed | ||
using the Cordova / Phonegap command line interface. | ||
|
||
``` | ||
phonegap plugin add https://github.com/lovelyelfpop/androidUpdatePlugin | ||
|
||
cordova plugin add https://github.com/lovelyelfpop/androidUpdatePlugin | ||
``` | ||
|
||
## version.txt ## | ||
|
||
Modify the "version.txt", and put it on your server. | ||
|
||
The encoding of this file must be UTF-8. | ||
|
||
`verCode`: - version Code, must be an integer | ||
|
||
`verName`: - version Name | ||
|
||
`apkPath`: - the url of the apk file | ||
|
||
`releaseNote`: - release Note | ||
|
||
|
||
## Using the plugin ## | ||
|
||
To use, call the method as follows: | ||
|
||
```javascript | ||
plugins.update.updateApp(upgradeUrl, success, failure); | ||
``` | ||
|
||
`upgradeUrl`: - the url of the file "version.txt" , 'http://www.aio7.com:8189/version.txt' for example. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,42 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" | ||
id="com.zybx.xiaofu" | ||
version="0.1.0"> | ||
id="com.plugin.update" | ||
version="1.0.0"> | ||
<name>apkUpdate</name> | ||
<description>Sample PhoneGap Apk Update Plugin</description> | ||
<description>PhoneGap/Cordova Apk Update Plugin</description> | ||
<license>MIT</license> | ||
<keywords>phonegap,android,autoupdate</keywords> | ||
|
||
|
||
<js-module src="www/updateAppPlugin.js" name="UpdateApp"> | ||
<clobbers target="window.update" /> | ||
</js-module> | ||
|
||
<keywords>phonegap,cordova,android,autoupdate</keywords> | ||
|
||
<!-- android --> | ||
<platform name="android"> | ||
<config-file target="res/xml/config.xml" parent="/*"> | ||
<feature name="UpdateApp"> | ||
<param name="android-package" value="com.zybx.xiaofu.UpdateApp" /> | ||
</feature> | ||
</config-file> | ||
<source-file src="src/UpdateApp.java" target-dir="src/com/zybx/xiaofu" /> | ||
</platform> | ||
<js-module src="www/updateAppPlugin.js" name="UpdateApp"> | ||
<clobbers target="plugins.update" /> | ||
</js-module> | ||
|
||
<config-file target="res/xml/config.xml" parent="/*"> | ||
<feature name="UpdateApp"> | ||
<param name="android-package" value="com.plugin.update.UpdateApp" /> | ||
</feature> | ||
</config-file> | ||
|
||
<config-file target="AndroidManifest.xml" parent="/*"> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
</config-file> | ||
|
||
<config-file target="res/values/strings.xml" parent="/*"> | ||
<string name="soft_update_title">新版本</string> | ||
<string name="soft_update_updatebtn">现在更新</string> | ||
<string name="soft_update_later">以后再说</string> | ||
<string name="soft_updating">更新中...</string> | ||
<string name="soft_update_cancel">取消</string> | ||
</config-file> | ||
|
||
<source-file src="src/UpdateApp.java" target-dir="src/com/plugin/update" /> | ||
|
||
<source-file src="res/layout/softupdate_progress.xml" target-dir="res/layout"/> | ||
</platform> | ||
</plugin> | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.