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 Build a Simple Android App Improving Our Code Creating a New Class

How can I store all these facts on a DB and use it on my app?

I want to create a DB and store more facts, then use it on my app. How I can create that DB? Where I need to make the connection?

Thanks

Mazen Halawi
Mazen Halawi
7,806 Points

You need to use SQLOpenHelper, create a new class extending SQLOpenHelper, then add the unimplemented methods and specifically override the onCreateDatabase and onUpdate

1 Answer

You might want to take the course on SQL databases in android right here on treehouse. Also check http://www.vogella.com/tutorials/AndroidSQLite/article.html. This is a very good article about using sqlite and might prove helpful.

Reed Lawrence
Reed Lawrence
3,211 Points

I didn't see the SQL Databases in Android course, can you post a link to it?