2

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

Laurent Meyer
  • 2,766
  • 3
  • 33
  • 57
조현욱
  • 77
  • 7

1 Answers1

0

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.

Laurent Meyer
  • 2,766
  • 3
  • 33
  • 57