Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install APK on Android w/Activity prompt
File f = new File(filePath);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(f), "application/vnd.android.package-archive");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment