0

I've a social networking app for android in which i can view list friends after fetching from java server +mySql database, actually i have done with loading all information from Java Servlets to android client but i'm unable to load images which are stored as blob in mysql on the server side database.

I tried to send blob objects to android client as strings and then tried to convert them in bitmap at the android client side. but I could not do what i wanted.. :(

Can anyone suggest me how to do it?

1 Answer 1

1

I think a viable solution is to put a simple blob servlet capable to send a image/your_image_format response via HTTP. This way you can easily download/decode the Bitmap in your Android client from the servlet response, then set it as your ImageVIew source.

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

6 Comments

Can you please tell me the way to do that. any example code for server & client side will be appreciated.
For the servlet code you can follow the link in my previous post (click on blob server). For the Bitmap download/decode stuff you can take a look here or here
What if i also want to send some textual information along with picture, for example name, age, gender etc.. Which will be part of user profile to be appeared along with picture.. Thanks.
I think merging image with other stuff in the same response is not a wise solution. You can serve additional infos via a dedicated servlet. The format of its response is up to you (ie: JSON, XML, etc.)
Sorry but I can't get the sense of your last comment. Please make it more clear or try to elaborate on that.
|

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.