Will you please help me with this problem.
I'm inserting values to my Sqlite database.
How can I check or view the inserted data.
Is there is any tool or other techniques to show the data ?
If you are running the sqlite3 command-line access program you can type ". tables" to get a list of all tables. Or you can type ". schema" to see the complete database schema including all tables and indices.
If You Want to Show a data on Log
try below code :
for (Contact cn : contacts) {
String log = "Id: "+cn.getID()+" ,Name: " + cn.getName() + " ,Phone: " + cn.getPhoneNumber();
// Writing Contacts to log
Log.d("Name: ", log);
Other Way to show a database
see below steps:
Tools -> DDMS
or click the Device Monitor icon next to SDK Manager in Tool bar.data -> data -> your project name.
After that your databases file will open. Click pull a file from device icon.
Save the file using .db extension.Tools -> SQLiteManager.
If you Download a database on DDMS
then You download
DB.Browser.for.SQLite-3.10.1-win64
and put the database
file on this software and you get the data.
I'll Update My Answer becoz now a days Android Studio update in Android Studio 3.1 or up to other like now 3.2 in this Studio DDMS function is not available but Don't Worry i have another solution.
In your android Studio See right side Bottom Corner there is one Option like Device File Explorer Click on this button
After that you can see like below image is open on your screen :
Now select data -> data -> your project name.
:)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With