Version: 0.10.2
How to get application path on android? So I can put images and use?
e.g. /storage/emulated/0/Android/data/{my app name}
Having some issues with finding the correct path.
I'm using react-native-image-picker to grab a photo. Then I want to save this into the application directory. dirs.DocumentDir
react-native-image-picker places images in '/storage/emulated/0/Android/data/{my app id}/files/Pictures/' and these files I can find when browsing for files.
However when using dirs.DocumentDir i get '/data/user/0/{my app id}/files/'
This is no issue because I can move and copy the files. But on android when I want to display the image with dirs.DocumentDir + "myimage.jpg" nothing is displayed.
I can validate the file exists with RNFetchBlob.fs.exists
+1
When you want to show photo in X components you should use 'file://' in Android
I had this problem before and adding 'file://' worked for me
Note: Don't add 'file://' when looking for the file using RNFetchBlob
Great! Thanks for the tip. That worked for me.
Works for me 2.
Most helpful comment
When you want to show photo in X components you should use 'file://' in Android
I had this problem before and adding 'file://' worked for me
Note: Don't add 'file://' when looking for the file using RNFetchBlob