From the to-do list: MPA V1.0: Import/ local / Offline
✔ Switch to offline mode
(Completed by Pierre henri Seylan on July 24, 2019)
Comments
Pierre henri Seylan on May 1, 2019:
While testing the offline mode, it appears that the app is not correctly detecting the online state.
Offline mode can basically occur in 2 cases:
the app is offline and the loses internet connection
the app is started while there is no internet connection
For the first case, the application continue to behave as if the app was online. We should switch to offline mode as soon as the internet connnection is o longer available, and switch back to online mode when the connection is available again.
Mainly, when the app is in offline mode, it should load and use only local datas.
Karim Alabtakh on July 4, 2019:
done
Pierre henri Seylan on July 4, 2019:
Feedback:
There is a delay when the app goes offline or back online. It is needed to scroll, use the filters or switch tab so that the app goes back online.
Is it possible to improve it?
Test scenario:
1.
disable wifi and check how long it takes for the system try icon to turn gray
same when re-enabling wifi
2.
offline mode in packs view
re-enable wifi and check how long it takes to update the grid with the cloud datas again
Karim Alabtakh on July 4, 2019:
Checking the online very often will case server overhead, so the client check the connection every 15sec or after failed requests. Some apps like telegram check the connection after closing and opening windows, so I can also add this feature.
Pierre henri Seylan on July 4, 2019:
Ok, is it possible to check it every 3 sec when the app is offline?
So the logic would be as follows:
While offline: -Check every 3 sec
All other cases: -Check every 15 sec -Check when opening and closing the window
Karim Alabtakh on July 4, 2019:
Yes, we can do that
Karim Alabtakh on July 5, 2019:
done
Pierre henri Seylan on July 23, 2019:
the switch to offline mode is still not completly smooth:
-when going offline, the view is not updated to display local datas (only after refreshinng the page) -when going online, the local filter remains enabled.
to-do: -let's make sure we refresh the view when going offline or online -when going online the local filter should be turned off
Comments
Pierre henri Seylan on May 1, 2019:
Offline mode can basically occur in 2 cases:
For the first case, the application continue to behave as if the app was online.
We should switch to offline mode as soon as the internet connnection is o longer available, and switch back to online mode when the connection is available again.
Mainly, when the app is in offline mode, it should load and use only local datas.
Karim Alabtakh on July 4, 2019:
Pierre henri Seylan on July 4, 2019:
There is a delay when the app goes offline or back online.
It is needed to scroll, use the filters or switch tab so that the app goes back online.
Is it possible to improve it?
Test scenario:
1.
2.
Karim Alabtakh on July 4, 2019:
Some apps like telegram check the connection after closing and opening windows, so I can also add this feature.
Pierre henri Seylan on July 4, 2019:
So the logic would be as follows:
While offline:
-Check every 3 sec
All other cases:
-Check every 15 sec
-Check when opening and closing the window
Karim Alabtakh on July 4, 2019:
Karim Alabtakh on July 5, 2019:
Pierre henri Seylan on July 23, 2019:
-when going offline, the view is not updated to display local datas (only after refreshinng the page)
-when going online, the local filter remains enabled.
to-do:
-let's make sure we refresh the view when going offline or online
-when going online the local filter should be turned off
see the video below:
https://www.dropbox.com/s/jk2xgs694m3o6d1/switch%20to%20offline%20mode.mov?dl=0
Karim Alabtakh on July 24, 2019: