开发者

Detect if application is installing [duplicate]

开发者 https://www.devze.com 2023-03-20 22:43 出处:网络
This question already has an answer here: How to catch or receive android os ' broadcasts' of installed applications?
This question already has an answer here: How to catch or receive android os ' broadcasts' of installed applications? (1 answer) Closed 7 years ago.

I know that you can check if an application is installed, and that Android has an intent for when the application installation completed.

Is it possible to check if one package is under installation?

I'm developing a installer and I'm using the bellow code to start the installation proccess

Uri apkFile = Uri.fromFile(new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)+"/myDownloaded.apk")); 

Intent promptInstall = new Intent(Intent.ACTION开发者_运维知识库_VIEW);
promptInstall.setDataAndType(apkFile, "application/vnd.android.package-archive");


Yes can be notified when other apps are installed: How to catch or receive android os ' broadcasts' of installed applications?

0

精彩评论

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