friends,
i am using ksoap library to call dotnet w开发者_开发知识库ebservice.
i am getting following webservice reponse
<imageByte>R0lGODlhlgBQAPcAAKPBqfP69Ja0m32hgxdVJdrb28zMzPr+/QRKEdPi1IGliL3PwCFXLP38+YSJhPr7+</imageByte>
<imageByte>R0lGODlhlgBQAPcAAKPBqfP69Ja0m32hgxdVJdrb28zMzPr+/QRKEdPi1IGliL3PwCFXLP38+YSJhPr7+</imageByte>
<imageByte>R0lGODlhlgBQAPcAAKPBqfP69Ja0m32hgxdVJdrb28zMzPr+/QRKEdPi1IGliL3PwCFXLP38+YSJhPr7+</imageByte>
removed some extra bytes from string because it was very lengthy.
1) i dont know which format it is. 2) how to convert it to byte[] to display it in android imageview.
any help would be appreciated.
This may be base64 encoding; at least it looks like the right mix of characters. The specific webservice docs should tell you more about the message format.
Assuming it is, and that one image is broken into multiple <imageByte /> tags, combine the contents into one long string. You can then use Base64.decode to get a byte[], and BitmapFactory.decodeByteArray to get a Bitmap handle, which you pass to ImageView.setImageBitmap
Hope this helps,
Phil Lello
精彩评论