How to use the same DB SQLlite with java and cordova?

0

Can I use the same DB using Java and Cordova? Ex: access data with CORD in a DB created in java.

    
asked by anonymous 06.05.2014 / 02:29

1 answer

0

Yes, you can access the Cordova database file via native Android Java, for this you should understand that Cordova uses a version of W3C Web SQL Database , which basically is an implementation for Webkit, it is worth remembering that Cordova implements a database if the device does not present such functionality.

Well, knowing this you can access the database through native Java for Android so just implement a way to read the SQL Web file. It is located in

/data/data/{package name}/app_database/file__0/0000000000000001.db

Do some testing to make sure the file is in the right place.

To implement a way to open the SQL Web database I recommend that you read the specifications in the W3C by clicking on this link or look for the native Cordova plugin to handle Web SQL DB.

    
30.05.2014 / 04:55