update:2020.05.23

fix:10.0网络问题,设备号获取问题
add:
This commit is contained in:
2020-05-23 17:49:46 +08:00
parent f037e1cb12
commit 12172e6706
23 changed files with 61 additions and 68 deletions

View File

@@ -76,7 +76,7 @@ public class ApkUtils {
Intent intent = context.getPackageManager().getLaunchIntentForPackage((String) view.getTag(R.string.download_btn_had));
context.startActivity(intent);
} catch (Exception e) {
Toast.makeText(context, R.string.open_app_fail, Toast.LENGTH_LONG).show();
ToastUtil.show(String.valueOf(R.string.open_app_fail));
}
return;
}
@@ -275,12 +275,12 @@ public class ApkUtils {
public void onNext(Integer value) {
if (value == 2) {
//安装成功
Utils.showToast(context, "安装成功");
ToastUtil.show("安装成功");
Log.e("fanhuitong", "-----------安装成功-----------");
} else {
//安装错误
Log.e("fanhuitong", "------------安装错误-----------");
Utils.showToast(context, "安装失败");
ToastUtil.show("安装失败");
}
}
@@ -336,6 +336,7 @@ public class ApkUtils {
e.printStackTrace();
}
}
public static boolean installApp(Context context, String apkPath) {
ToastUtil.show("正在安装应用...");
Process process = null;
@@ -464,6 +465,7 @@ public class ApkUtils {
}
return name;
}
public static void installApk(Activity activity, File newApkFile) {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addCategory(Intent.CATEGORY_DEFAULT);
@@ -479,7 +481,8 @@ public class ApkUtils {
intent.setDataAndType(uri, type);
activity.startActivity(intent);
}
public static void installApk(Context context, File newApkFile) {
public static void installApk(Context context, File newApkFile) {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);