0

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

Community
  • 1
  • 1
user1389233
  • 145
  • 2
  • 2
  • 9
  • Oh, the common solution is that create a background thread to download and UIthread to display that image. But I afraid It will leak your memory if you display too large image. – Tai Tran Jun 02 '12 at 06:33

1 Answers1

1

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.

waqaslam
  • 67,549
  • 16
  • 165
  • 178