How to convert a file:// uri into content:// uri?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have found that on my device, the default media display tool is not showing me the same if Ihave a uri that is: file : //mnt/sdcard/DCIM/Image.jpg When I go through picking the image with the built in intent I get this: content : //media/external/images/media/247 These both display the same file, but I don't have any sharing options when I use the first one. My question is, how can I find the content Uri given the file Uri? 回答1: I was making the file, so I had a File object file . So I do this now to get Uri for the file as a