Closed carotkut94 closed 3 years ago
This works for me:
ArrayList<MediaFile> files= data.getParcelableArrayListExtra(FilePickerActivity.MEDIA_FILES);
files.get(0).getPath();
but then getPath is deprecated in favour of gerUri thus, and on sdk 29+, getPath return null
I am using sdk 29 and it works, have you tried:
android:requestLegacyExternalStorage="true"
I have tried that too, but its unluckily not working in Android 10, returning null for getPath(). Till Android 9 (that is, Pie), its working fine.
i am also facing same issue. even i used your suggestion but no use.
so we should return back to geturi
i have two device with android 10 one of them i can pick a file with path {xiaomi with android one } second one, get null {Samsung A6 }
Same issue did you get any solution..?
I have same issue in Android 10 device if you have any solution please give me
I can get file using Uri on android 10 by following this answer
As in the latest build 1.3.2 , getPath is deprecated, and we now have to use getUri but, in order to get the file path from uri , none of the methods available on internet works. So whats the way to get the file path.