I know I can install an Android application programmatically by the below code which passes the URI of an APK file. Can I install the application without passing an APK file URI? For example, getting the byte array of an APK file and installing it?
File appFile = new File("application.apk");
Intent installIntent = new Intent(Intent.ACTION_VIEW);
installIntent.setDataAndType(Uri.fromFile(appFile),"application/vnd.android.package-archive");
startActivity(installIntent);