2

I have develop android app in which one UserProfile is there. I have send all details of user to server using Ksoap2. I also want to send image to server. But, i don't know how to send image to webservice using Ksoap2 in android.

I have take image from sdcard and convert it to ByteArray. Is there I have to send that parameter as ByteArray of image to webservice? I want to pass all details of user and image to webservice. How can I do this?

3 Answers 3

2

You can convert the your image into base64 string,and then handle them again to image at server side.

Sign up to request clarification or add additional context in comments.

Comments

0

You can send it as a Multipart file in a network call using retrofit 2 library. Kindly check this answer as a reference for detailed code snippet: https://stackoverflow.com/a/68511884/8391757

Comments

-1

You can convert the your image into base64 string,and then handle them again to image at server side. but it getting a poor quality of image

1 Comment

Please check your English and explain the cause of the poor quality.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.