Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/187.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如果没有market而不是system应用程序,我如何在android上自动安装apk_Android_Installation_Apk - Fatal编程技术网

如果没有market而不是system应用程序,我如何在android上自动安装apk

如果没有market而不是system应用程序,我如何在android上自动安装apk,android,installation,apk,Android,Installation,Apk,我在服务器中获得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")

我在服务器中获得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将更加不安全。

@camelcaseconder也许,如果我的应用程序是系统应用程序的话。可能?如果我的应用程序是系统应用程序,可能会。可能自动安装吗?