我如何在没有市场NOT系统应用程序的情况下在Android上自动安装APK

我如何在没有市场NOT系统应用程序的情况下在Android上自动安装APK

问题描述:

我在服务器中获得了APK.

I get apk in server.

我尝试

File apkFile = new File("/sdcard/Download/openapk.apk");
Uri apkUri = Uri.fromFile(apkFile);
Intent webIntent = new Intent(Intent.ACTION_VIEW);
webIntent.setDataAndType(Uri.fromFile(apkFile), "application/vnd.android.package-archive");
webIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(webIntent);

此代码. 在图片下方显示之后. 此代码是当我单击安装按钮时.开始安装. 但我想自动安装.apk执行

this code. after showing under picture. this code is when I click install button. start install. but I want auto install .and apk execution

apk执行后可能自动安装. ?

perhaps possible auto install after apk execution. ?

不是,不可能,这非常好,因为如果可能的话,这意味着应用可以在不询问用户的情况下在设备上安装任何东西.

Nope, not possible and it is pretty good because if it was possible, it would mean that an app could install anything on the device without asking the user...

Android将会变得更加不安全.

Android would be then even more insecure.