Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

adnanalvee2
adnanalvee2
6,862 Points

Best Practice for loading images in Android straight out of Sql Database.

What would your suggestion be load images from database without URL.

I've been looking for tutorials, everything is simply linked to getting the URL from JSON.

Well Suppose, Im making a facebook app, so for a profile, I pull up the name, address, other infos bla bla, but now for the photo field, the user has suppose several photos in the "photo" field in the sql table. I don't know if this could be done in JSON or not.

How do I display pull those photos? What should be an easy and good solution.

Ben Jakuben

1 Answer

You can store images directly into the database as blob (Binary Large Object) or you could you just save the url in the database so you can retrieve it with minimal effort using a library like picasso.