How do I get the file path from the content URI for video files?

喜欢而已 提交于 2019-12-02 03:39:24

How to get the file path with extension?

You don't. There is no requirement that the user select a piece of content that is saved as a file in a place that you have read access to. And there is no requirement that a ContentProvider offer some means of translating a Uri to a file path.

Use ContentResolver and openInputStream() to read in the content identified by the Uri.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!