Marqs
Marqs

Reputation: 17910

Using existing database in Firefox OS app

I don't know much about FirefoxOS hence this question.

I have an android app that ships with already prepared data saved in SQLite database. In the runtime the app copies that db to the device storage and uses it for reading and writing data. This is much more efficient than creating empty DB file and inserting data when the app first starts(e.g from JSON).

I was wondering how can I achieve the same thing in Firefox OS? Is there any way I can create IndexedDB, fill it with data and then add it to the app package as an asset?

Upvotes: 1

Views: 134

Answers (1)

msaad
msaad

Reputation: 599

Unfortunately this behavior is not yet supported. As Fabrice Desré mentioned in bugzilla, some of the files to achieve this behaviour is specific to gaia apps, which gecko does not have access at the moment.

By now, you will have to stick with the less efficient method (depending on the size of your db, the difference isn't that big).

Hope I was able to help,

cheers

Upvotes: 1

Related Questions