Am having a bitmap
, so I want to upload a webserivceas string and want to retrive the string.
For converting bitmap to string am using:
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);
byte[] byteArray = stream.toByteArray();
strBase64 = Base64.encodeToString(byteArray, Base64.URL_SAFE);
this above String
is using as property to in soapobject to upload.
But am getting Out of memory on a 11674900-byte allocation
, while print and uploading.
And if i debugged the issue, without printing am getting
com.sun.jdi.InvocationException occurred invoking method.
on soaprequest.
How to resolve this issue and to upload image
to webservice as string ?