imageview - Android loading local image with space in path and with universal image loader -


i developing android application in want display local image of universal image loader. when try display image has space in it's local image path not able display image. tried in following manner:

uri.fromfile(new file(newimagepath)).tostring(); 

i 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)         @ libcore.io.iobridge.open(iobridge.java:456) 

if tried load image has no space in local path works fine image space in path cause issue. need help. thank you.

actually problem universal image loader. https://github.com/nostra13/android-universal-image-loader/issues/371

so have decode image path remove space.

as per discussion in above link got solution :

final string uri = uri.fromfile(file).tostring(); final string decoded = uri.decode(uri);  imageloader.getinstance().displayimage(decoded, imageview); 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -