How can I auto install apk on android without market NOT system app

醉酒当歌 提交于 2019-12-22 12:43:18

问题


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. ?


回答1:


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.



来源:https://stackoverflow.com/questions/36833794/how-can-i-auto-install-apk-on-android-without-market-not-system-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!