Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - Where is SQLite Database stored [duplicate]

Possible Duplicate:
Where does Android emulator store SQLite database?

I am using SQLite and phonegap to create a multi platform app. However, I have run across an issue.

I am now looking for the location the phonegap stores the database files named 0000000000000001.db and database.db

I have found this for iPhone, however cannot seem to get the location for the Android. I am currently running on a simulator and actual device (ARCHOS).

like image 413
Raj Avatar asked Feb 10 '12 11:02

Raj


People also ask

Where does Android store SQLite database?

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.

How save and retrieve data from SQLite database in Android?

We can retrieve anything from database using an object of the Cursor class. We will call a method of this class called rawQuery and it will return a resultset with the cursor pointing to the table. We can move the cursor forward and retrieve the data. This method return the total number of columns of the table.

How do you avoid duplicate records in SQLite in flutter?

1) First identify the rows those satisfy the definition of duplicate and insert them into temp table, say #tableAll . 2) Select non-duplicate(single-rows) or distinct rows into temp table say #tableUnique. 3) Delete from source table joining #tableAll to delete the duplicates.


3 Answers

Open the DDMS perspective Window: (window->open perspective->other->DDMS) It should open in a new tab.

Go to DDMS -> file explorer -> data -> data -> see your package name -> databases -> here your database file. (In the upper right, choose "Pull file" from device.) Export it and open through an Sqlite database connector.

You will see your updated data. Before taking these steps make sure that you have run your application first.

like image 184
OnkarDhane Avatar answered Sep 27 '22 19:09

OnkarDhane


Here you can find your database, but only on emulator

enter image description here

like image 28
Natali Avatar answered Sep 27 '22 20:09

Natali


usually the database of app resides at the below folder

/data/data/[packagename]/databases

But have never used phonegap, so this might be different. You could check at above location.

like image 24
nandeesh Avatar answered Sep 27 '22 20:09

nandeesh