我如何在没有市场NOT系统应用程序的情况下在Android上自动安装APK [英] How can I auto install apk on android without market NOT system app

查看:116
本文介绍了我如何在没有市场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.

这篇关于我如何在没有市场NOT系统应用程序的情况下在Android上自动安装APK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆