如何在安卓系统上自动安装apk,而不需要market NOT系统应用?[英] How can I auto install apk on android without market NOT system app

本文是小编为大家收集整理的关于如何在安卓系统上自动安装apk,而不需要market NOT系统应用?的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我在服务器中获得APK.

我尝试

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执行

可能会在APK执行后进行自动安装. ?

在此处输入图像说明

推荐答案

不可能,这是很好的,因为如果可能的话,这意味着一个应用程序可以在设备上安装任何内容而无需询问用户...

Android将会更加不安全.

本文地址:https://www.itbaoku.cn/post/1937960.html

问题描述

I get apk in server.

and I try

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);

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

perhaps possible auto install after apk execution. ?

enter image description here

推荐答案

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 would be then even more insecure.