Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install apk file automatically after download

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

like image 282
Uday Avatar asked Aug 20 '13 09:08

Uday


1 Answers

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); 
like image 84
Prakhar Avatar answered Nov 01 '22 14:11

Prakhar