Aswan
Aswan

Reputation: 5135

get image from remote server

i have image in sqlserver db.using ksoap2 client webservice for getting image.there i am converting image into base64 encoding and in mobile i am converting it into base64 decoding but i am unable to get image

whats the problem.how i will get image or any alternative solution for this problem

Thanks in advance

Aswan

Upvotes: 2

Views: 1156

Answers (2)

Aswan
Aswan

Reputation: 5135

finally i got solution for my problem by creating custom base64 class

Upvotes: 2

Dario
Dario

Reputation: 128

If you decode from base64 what you get should be technically an image file and cannot be used directly in the code.

Maybe what you are looking for is something like

Image i = BitmapFactory.decodeByteArray(data, offset, length);

Where "data" is a byte array you have after the decoding, offset should be set to 0 and length equal to data.length.

After that, you can use the image with your views.

Upvotes: 1

Related Questions