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

后端 未结 2 1100
一向
一向 2021-01-19 05:29

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 achie

相关标签:
2条回答
  • 2021-01-19 06:13

    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..

    0 讨论(0)
  • 2021-01-19 06:13

    Easiest solution seems to be to create a shared preference plugin, should work well with small and simple data.

    0 讨论(0)
提交回复
热议问题