Pre-written database (Phonegap / Cordova + sqlite)

1

I'm developing an App using Phonegap / Cordova and Sqlite, however along with the application it is necessary to go a database containing approximately 50MB of text information. I'm using the "Phonegap" app in android to test the application, but I have no idea how to put the information (50MB) of text into the sqlite database (plugin).

When I installed the plugin (Sqlite) I did not find any database file where I could open it with a manager and enter the information manually so that when I made the "Buld" it would stay in the App.

I have not been able to find this information for 2 weeks, can anyone give me a light?

    
asked by anonymous 17.03.2016 / 00:12

1 answer

0

I can not comment afterwards, if need be. Typically after you compile the project and if you are creating the SQLite database when starting the application, the path to the database after created would look like the one on your device.

  

/data/data/com.phonegap.helloworld/databases/MyDatabase.db

To know the path where your app was installed just enter this in the terminal (Linux). with your device in debug mode and connected to the pc of course.

To access the device via the terminal:

  

adb shell

Return the path where the app is installed:

  

run-as "com.name.name"

Then just enter the / databases folder and there will be your ".db" file.

Although I do not think it is necessary to include manually by what I understand. you can create an insert script for when the app is started for the first time it inserts that data into the table.

    
04.12.2018 / 15:54