Launching Intent.ACTION_VIEW intent not working on saved image file

前端 未结 4 1249
广开言路
广开言路 2020-12-03 09:07

First of all let me say that this questions is slightly connected to another question by me. Actually it was created because of that.

I have the following code to wr

4条回答
  •  渐次进展
    2020-12-03 09:26

    I used this code for my app and works fine. I only did a litle change.

    I changed This:

    intent.setDataAndType(Uri.parse(posterFile.getAbsolutePath()),"image/*");
    

    For this:

    intent.setDataAndType(Uri.fromFile(posterFile),"image/*");
    

提交回复
热议问题