Hi. Again. I am with the solution for my own question. As nobody tried to answer this question. I am giving solution.
Javascript and java create database in different locations so we can not access DB created in Javascript in java or viceversa. So, there is a phonegap plugin named
SQLitePlugin. Using this plugin, we can create the database in the same location. This plugin just creates the DB in location where Java creates the DB. So same database can be accessed from Javascript and Java.
Once you have the plugin, Change the code used to open or create the database in javascript as given below,
var db=window.openDatabase("database_name","version","Definition","size");
var db=window.sqlitePlugin.openDatabase("database_name","version","Definition","size");
Using the above code, we can access the database created in java also.
The plugin is available in the following link. Step by step information is given in a detail way in this link.
SQLitePlugin
Thanks.