Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access localStorage or web database created in PhoneGap from Android native code

How is it possible to access Web SQL database created in PhoneGap app from native code in Android?

I have a local notification plugin set up and what I want to achieve is fetch user setting from web database to set a correct interval for my alarm.

like image 753
micadelli Avatar asked Nov 25 '22 02:11

micadelli


1 Answers

I have modified the Cordova(https://github.com/Coder-Nasir/incubator-cordova-android) in such a way that it will create the database in Android's Default location which is /data/data/package-name/databases/

By just this simple command

window.openDatabase("something", "1.0", "PhoneGap Demo", 0);

You will get your desired something.db in the above mentioned location..

like image 67
coderslay Avatar answered Apr 27 '23 08:04

coderslay