android - 如何在没有市场非系统应用程序的情况下在 android 上自动安装 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");
webIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(webIntent);

这段代码。 在图片下显示后。 此代码是当我单击安装按钮时。开始安装。 但我想要自动安装和 apk 执行

也许可以在 apk 执行后自动安装。 ?

enter image description here

最佳答案

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

Android 会更加不安全。

关于android - 如何在没有市场非系统应用程序的情况下在 android 上自动安装 apk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36833794/

相关文章:

android - Realm 浏览器/Android 设备监视器?

java - 无法打开数据库/无法将(数据库)的区域设置更改为 'en_US'

python - 在 Docker 中设置 cassandra 驱动程序(python)

linux - 如何在 linux 或 unix 上自动安装简单的应用程序

android - 为什么从 google play 下载时所需的空间大于 apk 大小

c# - 将自定义对象传递给 Xamarin Android 中的下一个 Activity

objective-c - 如何为 iPhone 应用程序安装/使用 RegexKitLite?

android - 如何使用 .apk 文件制作 EXE 文件

Android:无法在 Android 4.0 (ICS) 上以编程方式安装 .apk

android - 音频捕获Android无法正常工作