-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
survey is not working offline on the tablet #1
Comments
Update: Tested this scenario, except on my computer using Google Chrome browser. The application will in fact function offline and resume sending data to the server when connection resumes as long as the user submits one more survey! This is great. The code that makes this possible is located in Utilities.elm (note: Elm source code files are not included in this repo, but in survey_display_local, only the compiled javascript file (main.js) is included in this repo.)
The model.archive object is type aliased as an elm List that takes entries as its argument. As for the tablet, I am unsure as of yet why I got a net::ERR_INTERNET_DISCONNECTED maybe about 1min into using the app offline. |
@carlosviansi okay I figured this out. There were two settings in the kiosk app that needed to be changed for the app to work as intended: General -> Idle Page Timeout: this needed to be deselected "Idle Page Timeout" allowed the page to timeout when selected. This is not what we want. |
Thanks for the updates, so the TL;DR of this story is: Problem 1: How responses are stored offline
This finally maps to the memory I had from Forrest where he said he could only find how to provide
Nonetheless, the major drawback to the current indigenous workaround is that data persists in memory, not on disk. As such, if the tablet powers off, or if the last answer was the last one not to be submitted in the day, it will lose the data (as it requires a final submission) if a power off is scheduled. Assuming loss of connection is brief, our only concern should be on the setup sleep time to have a few hours ahead of the last class in the worst case scenario internet goes off towards the end of the last class of the day. Problem 2: The time-outs in the nexus 7.This you found to be a problem with the kiosk app itself, as you noted in the last comment. Due to the behavior of Elm in storing on memory, the timeout would lose the "invisible variable data". With you changing the settings, this is resolved, and we should expect only the limitations of Problem 1. Next StepsCould you create a diagram illustrating the way the offline functionality works? Given how subtle it is, I think an image would call enough attention to it. Specifically here is a proposal to the diagram:
|
xml file |
Ah! gotcha :-) In a way this issue is also part of #3. |
good point, yeah just a little more fine grain detail |
Ok this issue is also completed, it is just pending using the diagram for the readme, so I will be taking over from you. Do you have the .xml file too to attach here? |
@carlosviansi ok sounds good. sorry, the link to the xml was kind of hard to see so i added a small headline (see the bottom of the comment with the diagram) |
Oh I see now: offline_functionality.xml.zip Thanks! |
Pending moving the necessary information of this issue to the wiki! Re-assigned again to Ryan! Feel free to close after you move to the wiki :-) |
The data saving feature is no longer relevant, the kiosk browser is set to refresh every 5 minutes. CLosing this issue. |
To test this feature mentioned in the README, I ran the following scenario on the tablet:
The survey page will timeout.
I will check the server to see if reconnecting after timeout actually sends those few responses that are logged while Wifi was unavailable. If that does work, then I will only need to fix the timeout issue. Currently not 100% sure how data is being held "in-app" client side when connection is lost.
The text was updated successfully, but these errors were encountered: