Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIL doesn't support scheme(protocol) by default You should implement this support yourself

Hello I am capturing image from camera and save it into SDCARD and loading via Universal Image Loader but every time i get an error like

       09-20 14:38:22.617: E/ImageLoader(16626): 
      UIL doesn't support scheme(protocol) by default [/mnt/sdcard/temp_photobooth.png]. You should implement this support yourself (BaseImageDownloader.getStreamFromOtherSource(...))



     imgLoader.displayImage(Environment
                        .getExternalStorageDirectory().toString()
                        + File.separator + Const.TEMP_FILE, choosen_image);

can anybody help me what should i have to do for it?

like image 651
Raksha Avatar asked Sep 20 '13 09:09

Raksha


1 Answers

If you are loading image from SDCARD you should prefix the path with file:///.

String imageUri = "http://example.com/image.png"; // from Web
String imageUri = "file:///mnt/sdcard/image.png"; // from SD card
String imageUri = "content://media/external/audio/albumart/13"; // from content provider
String imageUri = "assets://image.png"; // from assets
String imageUri = "drawable://" + R.drawable.image; // from drawables (only images, non-9patch)

So you have to write like this:

imgLoader.displayImage("file:///"+Environment
    .getExternalStorageDirectory().toString() + File.separator + Const.TEMP_FILE, choosen_image);
like image 152
Siddhpura Amit Avatar answered Nov 08 '22 18:11

Siddhpura Amit