knowhi
map people to topics browse pings browse knugs find knowhi nav bar

Please login to ask a follow-up ping.

Related

No pings yet.


How do you view data in the Android SQLite database ?

resonance: 29.0% from: krupa

Open a command prompt.

Use the cd command to navigate to the tools folder in the Android SDK.

Type: adb -e shell
This tells the Android Debug Bridge (ADB) to use your current emulator (you can't have more than one emulator open).

At the #, type ls to browse directory.
At the next #, type cd /data/data/[your package name, i.e., com.example.project]/databases

At the next #, type sqlite3 [your database name].db

You'll see the following appear underneath:
sqlite3 [your database name].db
SQLite version 3.x.x
Enter ".help" for instructions

At the sqlite> prompt, type: select * from sqlite_master;

You should see your database info now. At the next sqlite> prompt, type: .tables

This will return a list of the tables in your database. At the next sqlite> prompt, type: select * from [your table name]

Now you have a list of the columns and associated data that resides in that table.

To see a full list of commands, type: .help at the sqlite> prompt

Related

No knugs yet.