Search code examples
androidandroid-layoutandroid-imageviewandroid-ksoap2

What's the best way to load the large size image from server to show on android device?


Possible Duplicate:
How to retriving base64 strings(large image) from server to android

well i need some ideas about sending large size images from server and receiving the image on client side android phone ,

i tried with base64 string format but i am success with transfering small size images but the size more than 3000*3000 dimension returns null while getting response from the server, Waiting for some good result from you guys ... to see coding pls refer How to retriving base64 strings(large image) from server to android

androidHttpTransport.call(SOAP_ACTION, envelope);
SoapPrimitive result =  (SoapPrimitive)envelope.getResponse();
 

it returns null for large size image


Solution

  • You may try downloading the image directly (without Base64) from source on the web as below:

    URL url = new URL("your_url_to_the_image");
    URLConnection ucon = url.openConnection();
    InputStream is = ucon.getInputStream();
    

    And now save the InputStream to a File in cache on SD card. Afterwards refer to the saved file to load image.

    For more info, read this.