Im making a Dictionary App for my subject and my plan is to view the content of My Data.db using ListView.
I’ve read this blog about using sqlite in android but I’m “NEW” in android programming. 🙁
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The article link sort of answers your question. It shows how to copy a db from your local assets folder into the db your application uses. Android is set up to create databases for you, as such it keeps them in its own file path location. Lots of tutorials show how to copy a db from your assets folder to the Application DB. This tends to be a one of installation/setup procedure after which you’d use the content provider to store data in the default location used by android.
I.e. you might provide the user with a reset option, that would carry this out, wiping existing db but replacing it with a valid empty db.
The following article looked up on google goes into some depth to that would give you further help using content providers and list. You might have to combine it with the tutorial you already have if it doesn’t cover loading a db from the assets folder.
http://www.vogella.com/articles/AndroidSQLite/article.html