开发者

Launching The package installer

开发者 https://www.devze.com 2022-12-26 19:25 出处:网络
I\'m looking for a way to automatically start the android Package Installer , after the browser finishes downloading an apk file . Anyideas on this ? Currently after the downloadis over the list of do

I'm looking for a way to automatically start the android Package Installer , after the browser finishes downloading an apk file . Any ideas on this ? Currently after the download is over the list of downloaded files is displayed and clicking on the downloaded apk launches the Package installer . (step which I'd like to automatize)

I've thought on l开发者_开发知识库aunching the instalation manually with code like this :

intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("file:///sdcard/downloadedApk"),
"application/vnd.android.package-archive");
startActivity(intent); 

,but I'm unable to find when the download completes to execute the snipet above.


You cannot "automatically start the android Package Installer , after the browser finishes downloading an apk file" -- sorry!


Uri uri = Uri.fromParts ( "package", "abc", null);

rtn = new Intent (Intent.ACTION_PACKAGE_ADDED, uri);

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号