Get file path from URI

前端 未结 8 1153
你的背包
你的背包 2020-12-03 01:54

I have Uri for Image file.

I use this code for gets file path from Uri:

public String getRealPathFromURI(Uri contentUri) {
    Cursor cursor = null;
         


        
8条回答
  •  误落风尘
    2020-12-03 02:42

    Make sure you give permission in Manifest. Wasted 2 hours trying various methods without giving permissions :/

    
    

提交回复
热议问题