I can't display image from app data folder:
/data/data/com.proba.santaapp/files/JPEG_20141014_213921_.jpg
I pass this path to UIL library such as:
file:///data/data/com.proba.santaapp/files/JPEG_20141014_213921_.jpg
but i get error.
why ?
+1
You're doing something wrong. Try to debug whether you pass correct URL into displayImage(...)
method,
@nostra13 I get following error on displaying image:
11-23 17:21:45.856: E/ImageLoader(27773): UIL doesn't support scheme(protocol) by default [/storage/emulated/0/myfolder/1416745280690_fact_6.jpg]. You should implement this support yourself (BaseImageDownloader.getStreamFromOtherSource(...))
11-23 17:21:45.856: E/ImageLoader(27773): java.lang.UnsupportedOperationException: UIL doesn't support scheme(protocol) by default [/storage/emulated/0/myfolder/1416745280690_fact_6.jpg]. You should implement this support yourself (BaseImageDownloader.getStreamFromOtherSource(...))
11-23 17:21:45.856: E/ImageLoader(27773): at com.nostra13.universalimageloader.core.download.BaseImageDownloader.getStreamFromOtherSource(BaseImageDownloader.java:235)
11-23 17:21:45.856: E/ImageLoader(27773): at com.nostra13.universalimageloader.core.download.BaseImageDownloader.getStream(BaseImageDownloader.java:97)
11-23 17:21:45.856: E/ImageLoader(27773): at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.downloadImage(LoadAndDisplayImageTask.java:290)
11-23 17:21:45.856: E/ImageLoader(27773): at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.tryCacheImageOnDisk(LoadAndDisplayImageTask.java:273)
11-23 17:21:45.856: E/ImageLoader(27773): at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.tryLoadBitmap(LoadAndDisplayImageTask.java:229)
11-23 17:21:45.856: E/ImageLoader(27773): at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.run(LoadAndDisplayImageTask.java:135)
11-23 17:21:45.856: E/ImageLoader(27773): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
11-23 17:21:45.856: E/ImageLoader(27773): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
11-23 17:21:45.856: E/ImageLoader(27773): at java.lang.Thread.run(Thread.java:841)
You pass wrong URI into displayImage(...)
method.
https://github.com/nostra13/Android-Universal-Image-Loader#acceptable-uris-examples
Please provide "file://" before your path like Strung url="file://"+filepath;
Thanks @bhaveshkaila, I fixed my problem
This path must add "file://" before
thanks @bhaveshkaila,
09-17 08:22:36.962 24085-26904/com.example.bittu.chathead E/ImageLoader: UIL doesn't support scheme(protocol) by default [file:/null]. You should implement this support yourself (BaseImageDownloader.getStreamFromOtherSource(...))
java.lang.UnsupportedOperationException: UIL doesn't support scheme(protocol) by default [file:/null]. You should implement this support yourself (BaseImageDownloader.getStreamFromOtherSource(...))
at com.nostra13.universalimageloader.core.download.BaseImageDownloader.getStreamFromOtherSource(BaseImageDownloader.java:280)
at com.nostra13.universalimageloader.core.download.BaseImageDownloader.getStream(BaseImageDownloader.java:99)
at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.downloadImage(LoadAndDisplayImageTask.java:291)
at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.tryCacheImageOnDisk(LoadAndDisplayImageTask.java:274)
at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.tryLoadBitmap(LoadAndDisplayImageTask.java:230)
at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.run(LoadAndDisplayImageTask.java:136)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
09-17 08:22:36.972 24085-26903/com.example.bittu.chathead E/ImageLoader: UIL doesn't support scheme(protocol) by default [file:/null]. You should implement this support yourself (BaseImageDownloader.getStreamFromOtherSource(...))
java.lang.UnsupportedOperationException: UIL doesn't support scheme(protocol) by default [file:/null]. You should implement this support yourself (BaseImageDownloader.getStreamFromOtherSource(...))
at com.nostra13.universalimageloader.core.download.BaseImageDownloader.getStreamFromOtherSource(BaseImageDownloader.java:280)
at com.nostra13.universalimageloader.core.download.BaseImageDownloader.getStream(BaseImageDownloader.java:99)
at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.downloadImage(LoadAndDisplayImageTask.java:291)
at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.tryCacheImageOnDisk(LoadAndDisplayImageTask.java:274)
at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.tryLoadBitmap(LoadAndDisplayImageTask.java:230)
at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.run(LoadAndDisplayImageTask.java:136)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
can any body help me please
Hi @shubhamsingh9006346 , you passed invalid file url to UIL look to debug:
file:/null - why null?
boyfox
i passed path in a proper way but still i get error....
You should implement this support yourself (BaseImageDownloader.getStreamFromOtherSource(...))
@boyfox
what should i do please help me because i want add image from gallery and show in other activity.
UniversalImageLoader.setImage( intent.getStringExtra( getString( R.string.selected_images ) ),image,null,mAppend );
like that
Hey dear i have the same problem right now .please help me.
@WaxeamRaja check your passed url
Most helpful comment
Please provide "file://" before your path like Strung url="file://"+filepath;