Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view data saved in android database(SQLite)?

Tags:

android

sqlite

I am able to view the database from eclipse(from file explorer), but I want to view the whole detail, I mean the data that I have inserted, which I am unable. And my complete Android installation has made on F Drive.

like image 286
Jai Android Avatar asked Apr 23 '11 05:04

Jai Android


People also ask

How do I view the contents of a SQLite database?

Open a command prompt (cmd.exe) and 'cd' to the folder location of the SQL_SAFI. sqlite database file. run the command 'sqlite3' This should open the SQLite shell and present a screen similar to that below.

Where the data is stored in SQLite Android?

The Android SDK provides dedicated APIs that allow developers to use SQLite databases in their applications. The SQLite files are generally stored on the internal storage under /data/data/<packageName>/databases.


2 Answers

You can access this folder using the DDMS for your Emulator. you can't access this location on a real device unless you have a rooted device.

You can view Table structure and Data in Eclipse. Here are the steps

  1. Install SqliteManagerPlugin for Eclipse. Jump to step 5 if you already have it.
  2. Download the *.jar file from here
  3. Put the *.jar file into the folder eclipse/dropins/
  4. Restart eclipse
  5. In the top right of eclipse, click the DDMS icon
  6. Select the proper emulator in the left panel
  7. In the File Explorer tab on the main panel, go to /data/data/[YOUR.APP.NAMESPACE]/databases
  8. Underneath the DDMS icon, there should be a new blue icon of a Database light up when you select your database. Click it and you will see a Questoid Sqlite Manager tab open up to view your data.

*Note: If the database doesn't light up, it may be because your database doesn't have a *.db file extension. Be sure your database is called [DATABASE_NAME].db

*Note: if you want to use a DB without .db-Extension:

  1. Download this Questoid SqLiteBrowser: http://www.java2s.com/Code/JarDownload/com.questoid/com.questoid.sqlitebrowser_1.2.0.jar.zip

  2. Unzip and put it into eclipse/dropins (not Plugins)

Check this for more information

like image 152
droid kid Avatar answered Oct 15 '22 19:10

droid kid


Dowlnoad sqlite manager and install it from Here.Open the sqlite file using that browser.

like image 30
vnshetty Avatar answered Oct 15 '22 19:10

vnshetty