开发者

How to prompt the "open with" menu after download a zip file

In my app I download .zip files. Is there a way when those files are downloaded, have a button/notification when clicked prompt the "open with" m开发者_JAVA百科enu with third party compatible apps?

How to do that without knowing which zip handling apps are installed in the user phone?

Also, how to apply to apk files , to prompt app install ?


Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
File file = new File(path);
intent.setDataAndType(Uri.fromFile(file), "application/zip");
startActivity(intent); 


If you add a button to open the file, it will take care of all of this automatically.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜