java - How to pass byte array of an Image over a soap web-service(XML) and decode this byte array on android device to convert it back to an Image -
i want send images on web service android device. web service written in vb.net , being called android device fetch data. can fetch data normally, issue images. have converted image byte array, converted string , passed on web service(xml) android device. cannot decode string byte array image on android side. how achieve this? simple solution? using wrong approach?
for converting image string :
string imageasstring=base64.encodetostring(bytearray, base64.default);
for converting string image:
byte[] imageasbytes = base64.decode(imageasstring.getbytes(), base64.default); imageview image = (imageview)findviewbyid(r.id.imageview); bitmap imgbitmap=bitmapfactory.decodebytearray(imageasbytes,0,imageasbytes.length); image.setimagebitmap(imgbitmap);
Comments
Post a Comment