• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to access Image stored in mysql using android application

velm40

Lurker
Please help me, i need to access image file stored in mysql through android application. I stored data in blob format mysql. I have a REST web service to access data from mysql db, after retrieving that the response in JSON format, i am trying to convert it into bitmap, but it is giving null. Please give some suggestion to solve my problem.
 
Can you be more specific? What methods to you use to convert json to bitmap, how you doing it, etc.

You sure you retrieved that json data properly?
 
Thanks for your reply NebulaBytes...i solved my problem..Problem i faced was that, i retrieved response in json format from server, which contains image data in ordinary string. then i am trying to convert it into bitmap in client side, but it returned me null.

I think now you understand what my problem was...

Then i found the reason behind this...that is i am not doing any encoding(Base64) in server side to convert the image data into string, which can be decoded in client side to get actual image data. After doing this i can get the image perfectly in client side... again thanks for your reply..

One more doubt, i need to know that is that the only way to retrieve image data from server using REST Service?..
 
Back
Top Bottom