0

Hi I'm checking if there is a fast way of checking if the sqlite database has been set up properly in android ?

Anyway to printf it ? or anyway to quickly see it ?

Thank you !

2 Answers 2

3

Firstly, check that you can find the Database in the File Explorer:

data/data/<package_where_DB_is_created>/databases/<db_name>.db

You can then export that using the "Pull a file from the device" option in the top right. Finally, you can use SQLiteBrowser ( http://sourceforge.net/projects/sqlitebrowser/ ) or similar to check that the contents match your expectations.

Additionally, I am sure you have tested with running INSERT and whatnot commands on it? I didn't do much testing on my DB except verifying that everything worked smoothly when I added and gathered entries from it (as that is all it does, being a rather simple one).

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks Klaus ! Just one further question , does the database files have to be in .db ? I've set up my sqlite data base from my own file in assets folder and generated a file without any extensions. So i.e. just "data" instead of "data.db". will a file without the extension work in android ?
I don't actually know! Honestly, I would just test it and see what happens, but I would definitely expect it to work fine. I thought this was a DB that you created yourself - haven't played around much with importing Databases. As Philip mentioned below, the sqlite3 thing is handy too, just takes a bit of command tinkering.
0

Alternatively you can run adb, go into shell mode, and run sqlite3 on the device.

1 Comment

thanks Philip ! is there a tutorial for this method which u mentioned ?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.