Get file path from URI

前端 未结 8 1158
你的背包
你的背包 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:38

    Check following link is the best solution http://kaushalprajapati.net/mobile/android/android-get-the-full-file-path-from-uri/

提交回复
热议问题