I am developing android application in which I want to display local image with the help of universal image loader. But when I try to display image which has space in it's local image path then it not able to display image. I tried it in following manner:
Uri.fromFile(new File(newImagePath)).toString();
I am getting following error:
java.io.FileNotFoundException: /storage/emulated/0/WhatsApp/Media/WhatsApp%20Images/IMG-20150421-WA0002.jpg: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:456)
If tried to load image which has no space in its local path then it works fine but image with space in its path cause issue. Need some help. Thank you.
Actually its problem with universal image loader. https://github.com/nostra13/Android-Universal-Image-Loader/issues/371
So you just have decode your image path to remove space.
As per discussion in above link I got the solution :
Can you try to replace space with "\u0020";