Custom database in android application.

Many a times while designing an android app, you would want to fill up a database using whatever data is required by using your pc and then export that database into your android application.

I had this issue while developing my WordCram :P application when I had to export a wordlist to my application after filling it up from and excel file. The following tutorial helped me get over that issue.

Using Your Own SQlite database in your android apps

Its nicely explained. But one point that must be noted is that while making a query to the database, the cursor MUST return _id field of the table that is being queried, else you will encounter issues like this

http://stackoverflow.com/questions/3359414/android-column-id-does-not-exist

Lemme know if you require the code for doing so, I tested the setup for the Notepad example by using my prefilled database to return values. After about an hour of fooling around, did manage to get it to work.

 

Tagged with: ,
Posted in Articles, Technical
  • MAverick

    Only words of letter ‘A’ eh??

    • ric03uec

      i guess it contains words of all the letters :)