I have created a table in SQLite using phonegap. How can i have access to this table using Java? Because i have made a background process (as a phonegap plugin) which needs to retrieve data from the already made table.
Asked
Active
Viewed 935 times
1 Answers
0
Your database is located in
On Eclipse :
Window>Open Perspective>Other>DDMS
-- in File Explorer tab
data>data>your_package_name>databases>your_DB_fileName
So at any point of time if database is successfully create and available in it respective location, then you can read it programatically using the path
/data/data/your_package_name/databases/your_DB_fileName

Vinayak Bevinakatti
- 40,205
- 25
- 108
- 139
-
I am working on a real device, so i can't see anything in File Explorer. The "your_DB_fileName" has to do with a name I have already defined before? – user1308366 Apr 30 '12 at 14:00
-
you can connect your device with your PC through USB and debug directly/see the DDMS – Vinayak Bevinakatti Apr 30 '12 at 14:12
-
in the "data" section I am not able to see anything. – user1308366 Apr 30 '12 at 14:16
-
are you sure the DB is created? – Vinayak Bevinakatti Apr 30 '12 at 14:21
-
surely, i can access the content of the database through phonegap. – user1308366 Apr 30 '12 at 14:23
-
What path you used for DB creation? – Vinayak Bevinakatti Apr 30 '12 at 14:29
-
After doing a small research I found that by default PhoneGap will not store the DB in data/data/.. folder of Android system. Hence a guy(Coder_sLaY) modified Cordova in such a way that it will create the database in Android's Default location which is (/data/data/package-name/databases/) Refer : http://stackoverflow.com/a/9718094/28557 – Vinayak Bevinakatti Apr 30 '12 at 14:43
-
this solutiuon doesn't work for me and this answer you posted doens't seem to be accepted-solved. Thanks anyway. – user1308366 May 02 '12 at 11:29