Install apk file automatically after download

android, android-emulator

Solution

To install a apk use this code:

Intent promptInstall = new Intent(Intent.ACTION_VIEW)
    .setData(Uri.parse("file:///path/to/your.apk"))
    .setType("application/vnd.android.package-archive");
startActivity(promptInstall); 

Problem

I have downloaded apk file using download manager api and i don't know where that file is storing.now i have to find that apk file and install it Give some clue. Thanks in advance

Original source

Related problems