File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66* Android Studio
77
8- allprojects {
9- repositories {
10- ...
11- maven { url 'https://jitpack.io' }
12- }
13- }
14-
15- dependencies {
16- compile 'com.github.shuhaoSCode:AndroidBeatUpdate:-SNAPSHOT'
17- }
18-
8+ allprojects {
9+ repositories {
10+ ...
11+ maven { url 'https://jitpack.io' }
12+ }
13+ }
14+
15+ dependencies {
16+ compile 'com.github.shuhaoSCode:AndroidBeatUpdate:-SNAPSHOT'
17+ }
18+
1919* eclipse。。。请自行copy class。
2020
21- ## 更新版本
21+ ## 当前功能
22+ * 下载apk
23+ * 自动安装
24+ * 下载进度百分比监听
25+
26+ ## 简单使用
27+
28+ UpdateManager.getInstance(this).downloadApk("下载链接", "想要保存的名称.apk").isOpenApk(true).setDownloadInProgessLintener(new UpdateManager.DownloadInProgressLintener() {
29+ @Override
30+ public void inProgress(int progress) {
31+ Log.e(TAG, "downloadInProgress: " + progress);
32+ }
33+ });
34+
35+ ## 详细说明
36+ * 初始化
37+
38+ ```
39+ UpdateManager.getInstance(this)
40+ ```
41+ * 下载
42+
43+ ```
44+ UpdateManager.downloadApk("下载链接", "想要保存的名称.apk")
45+ ```
46+ * 下载完成后是否打开(默认false 不打开)
47+
48+ ```
49+ UpdateManager.isOpenApk(true)
50+ ```
51+ * 监听器
52+
53+ ```
54+ UpdateManager.setDownloadInProgessLintener(new UpdateManager.DownloadInProgressLintener() {
55+ @Override
56+ public void inProgress(int progress) {
57+ //progress下载百分比
58+ Log.e(TAG, "downloadInProgress: " + progress);
59+ }
60+ });
61+ ```
You can’t perform that action at this time.
0 commit comments