sdanigo
Posts: 0
Joined: Sat Jun 06, 2015 8:50 pm

Question about offline app

Hi all,
I can read that the rest services support 'off line'. I'm just wondering if we have to manage this or if it is all pre-programmed.
I understand that the get, put, delete will be queued when offline and then process when online.
But what about the GET ? Do we have to 'pre-populate' local storage with data we are going to use ?
In my case, after login, users receive their work for the day from a database (basicaly, they receive addresses of client to visit, max of 10 client).
When they arrive at their client, they have to enter certain information associated to that client. All that is extract from a mySql server and is suppose to be updated live via their phone.
All the services , mapping, screens are done and all is working but I access directly my data and I don't know if it's a good strategy or if I'd better access my data and then create local storage and then map from that local storage.

Well, if someone could point me in the best strategy, it would be greatly appreciated.

Thanks

Sylvain

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Question about offline app

Hello Sylvain,

Do you mean API Express offline mode? https://devcenter.appery.io/documenta...

Simple REST services don't support offline mode

sdanigo
Posts: 0
Joined: Sat Jun 06, 2015 8:50 pm

Question about offline app

Hi Sergiy
Yes, I talk about Api express. (I have created my Rest Api via API express, and I have created rest service in my App by pasting the Rest service URL, as shown in the last tutorial video about API express)

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Question about offline app

Hi Sylvain,

All GET requests will be taken from the app cache, so basically -- if such requests were made when the device was online, such requests will be replicated from cache when device goes offline.

sdanigo
Posts: 0
Joined: Sat Jun 06, 2015 8:50 pm

Question about offline app

Hi,
so I've tested.
I was online and perform some queries.
Then I switch my phone to 'airplane mode' and, without leaving the app, try to perform same GET queries.
When I go on a page that invoke a service (GET, service invoked on pageShow event, servive made with APIExpress), even if that GET was already performed when I was online, I always have a blank page (no results) when I'm offline.

Is there something I'm not doing the right way here ?

Thanks

Sylvain

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Question about offline app

Sylvain, GET requests don't work in offline mode:

When the client goes offline, all change-requests (POST, PUT, DELETE) to the server are going to be queued waiting to go online. (https://devcenter.appery.io/documenta...)

sdanigo
Posts: 0
Joined: Sat Jun 06, 2015 8:50 pm

Question about offline app

Hi Sergiy,
so what's the correct answer, yours or Illya's ?

Thanks

Sylvain

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Question about offline app

Sylvain - And when you're back online are GET requests performing?

sdanigo
Posts: 0
Joined: Sat Jun 06, 2015 8:50 pm

Question about offline app

No, only the newset one

sdanigo
Posts: 0
Joined: Sat Jun 06, 2015 8:50 pm

Question about offline app

newest (not newset) :-)

Return to “Issues”