Access to a local database or web database created in PhoneGap from native Android code

How can I access the Web SQL database created in PhoneGap from native Android code?

I have the local notification plugin installed, and I want to get the user settings from the web database to set the correct interval for my alarm.

+5
source share
2 answers

The simplest solution seems to be to create a common preference plugin, should work well with small and simple data.

-1
source

I changed Cordoba ( https://github.com/Coder-Nasir/incubator-cordova-android ) so as to create a database in Android Default location, which is /data/data/package-name/databases/

This simple command

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

You will get the required something.db in the above location.

+1
source

Source: https://habr.com/ru/post/914443/


All Articles