Page 1 of 2

Offline Mobile App with Database

Posted: Tue Jun 18, 2013 5:52 am
by Alas Licorne

I got an export database from Mysql in Json format with around 800 entries. each data set got 8 colons. The app to built is about to show/display the detail about entry via a search box input. The requierement is that it must work offline.

I've read about echo service but donot get how to work with. Also want to know to prepopulate the database for the first load of the app.

Plz help


Offline Mobile App with Database

Posted: Tue Jun 18, 2013 8:59 am
by Maryna Brodina

Hello! This link should help http://docs.appery.io/documentation/a.... If you still have any specific questions regarding Echo mode, please let us know. I'll update as for you second question.


Offline Mobile App with Database

Posted: Tue Jun 18, 2013 9:55 am
by Maryna Brodina

If you want to use REST services feature (I mean mapping results to page) it's better to save data in some local storage variable and then use it in generic rest service https://getsatisfaction.com/apperyio/...

Advantage of generic service is that in comparison with Echo is that you can use Request parameters for request, but with Echo mode you'll get all 800 entries. If you don't use mapping and fill the elements on page using JS then it would be enough just work with local storage variable (no need to create Generic service).

2) regarding your question "prepopulate the database for the first load of the app" - if you mean you want to upload all data from DB when app loads first time and then work in offline mode - you can check on page Load event if the local storage variable filled with data then don't do anything, otherwise call service to get data and map received data to local storage.


Offline Mobile App with Database

Posted: Wed Jun 19, 2013 5:22 am
by Alas Licorne

THank for the reply , will work on it and update You


Offline Mobile App with Database

Posted: Wed Oct 16, 2013 8:15 pm
by Helen

Hello, I have a related question.

I also am developing an offline mobile app. I would like to ship my app with a pre-populated database, avoiding the need to 'load' upon first use. How do I do this using Appery?

Thanks!
Helen


Offline Mobile App with Database

Posted: Wed Oct 16, 2013 9:07 pm
by Maryna Brodina

Hello! You can export data in any way to your app. Add this data to the project (for example as a string or array in JS asset) and then while installing app restore them.


Offline Mobile App with Database

Posted: Wed Oct 16, 2013 9:36 pm
by Helen

I would like to include this data in my app as a pre-loaded database as part of installation.

I do not want to have to 'load' or 'restore' the data.

Is there a way to ship or 'bundle' a pre-populated sqlite database ?

Thanks.


Offline Mobile App with Database

Posted: Thu Oct 17, 2013 9:08 am
by Kateryna Grynko

Hi Helen,

If you get data outside the Appery.io, you can paste it into a JavaScript asset all the same.


Offline Mobile App with Database

Posted: Sun Nov 03, 2013 1:25 am
by pakbull

But is this possible with a large set of data? also is there a JS example?

Similar idea as above. Have tables of data and based on input from a user from dropdown1, look up the key value (given by user) and then fetch the related values from the database and populate a dropdown2. When user now selects the value from the dropdown2, lookup the database with both dp1 and dp2 values and populate dropdown3.

The table looks like:
a1, a2, a3
b1, b2, b3
c1, c2, c3
and so on.


Offline Mobile App with Database

Posted: Sun Nov 03, 2013 4:15 am
by maxkatz

You can do anything the browser will support. The app that you create in Appery.io runs in the browser. You can use local storage to save date. You can also consider using IndexedDB (or SQLite) database.