|
|
|
@ -137,7 +137,7 @@ public class MainActivity extends AppCompatActivity { |
|
|
|
|
@Override |
|
|
|
|
public void onClick(DialogInterface dialog, int which) { |
|
|
|
|
mAppUpdater = new AppUpdater.Builder() |
|
|
|
|
.serUrl(mUrl) |
|
|
|
|
.setUrl(mUrl) |
|
|
|
|
.build(getContext()) |
|
|
|
|
.setUpdateCallback(new AppUpdateCallback() { |
|
|
|
|
@Override |
|
|
|
@ -188,7 +188,7 @@ public class MainActivity extends AppCompatActivity { |
|
|
|
|
@Override |
|
|
|
|
public void onClick(View v) { |
|
|
|
|
mAppUpdater = new AppUpdater.Builder() |
|
|
|
|
.serUrl(mUrl) |
|
|
|
|
.setUrl(mUrl) |
|
|
|
|
.build(getContext()); |
|
|
|
|
mAppUpdater.start(); |
|
|
|
|
AppDialog.INSTANCE.dismissDialog(); |
|
|
|
@ -221,7 +221,7 @@ public class MainActivity extends AppCompatActivity { |
|
|
|
|
@Override |
|
|
|
|
public void onClick(View v) { |
|
|
|
|
mAppUpdater = new AppUpdater.Builder() |
|
|
|
|
.serUrl(mUrl) |
|
|
|
|
.setUrl(mUrl) |
|
|
|
|
// .setPath(Environment.getExternalStorageDirectory() + "/.AppUpdater")//如果适配Android Q,则Environment.getExternalStorageDirectory()将废弃
|
|
|
|
|
// .setPath(getExternalFilesDir(Constants.DEFAULT_DIR).getAbsolutePath())//自定义路径,推荐使用默认
|
|
|
|
|
// .setApkMD5("3df5b1c1d2bbd01b4a7ddb3f2722ccca")//支持MD5校验,如果缓存APK的MD5与此MD5相同,则直接取本地缓存安装,推荐使用MD5校验的方式
|
|
|
|
@ -249,7 +249,7 @@ public class MainActivity extends AppCompatActivity { |
|
|
|
|
@Override |
|
|
|
|
public void onClick(View v) { |
|
|
|
|
mAppUpdater = new AppUpdater.Builder() |
|
|
|
|
.serUrl(mUrl) |
|
|
|
|
.setUrl(mUrl) |
|
|
|
|
.setVibrate(true) |
|
|
|
|
.setSound(true) |
|
|
|
|
.build(getContext()); |
|
|
|
|