Skip to content
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

Questions lost if screen goes off #283

Open
wehlutyk opened this issue Sep 21, 2014 · 4 comments
Open

Questions lost if screen goes off #283

wehlutyk opened this issue Sep 21, 2014 · 4 comments

Comments

@wehlutyk
Copy link
Member

Your screen goes off during a probe because you were distracted. You get the phone back on, questions are gone. No explanation. And you're very surprised.

@wehlutyk wehlutyk added this to the ECCS optional milestone Sep 21, 2014
@vincentadam87
Copy link
Contributor

that is what you get when you daydream when you are not supposed to

2014-09-21 21:49 GMT+01:00 Sébastien Lerique [email protected]:

Your screen goes off during a probe because you were distracted. You get
the phone back on, questions are gone. No explanation. And you're very
surprised.


Reply to this email directly or view it on GitHub
#283.

@wehlutyk
Copy link
Member Author

Detecting when screen is going off is done by registering a Broadcast Receiver at runtime: http://www.coderzheaven.com/2011/01/18/detect-when-the-android-screen-goes-off-2/

In that case we set a flag in PageActivity, so that the onPause/onStop doesn't finish itself if the screen is going off. We also need a new status for sequences: STATUS_PAUSED

@wehlutyk wehlutyk self-assigned this Sep 26, 2014
@wehlutyk wehlutyk modified the milestones: 0.26, 0.26 optional Oct 3, 2014
@MklBst MklBst modified the milestones: Beta Release, 0.26 optional Oct 10, 2014
@wehlutyk
Copy link
Member Author

Does this bother anybody else @vincentadam87 @MklBst ?

Detecting when the screen is going off turns out to be pretty complicated. So I'm thinking of doing it differently:

  • instead of clearing a sequence away (and marking it as incomplete) whenever the user leaves it (which includes when the screen goes off), allow the user to leave and come back to the sequence using the recent activities functionality of Android,
  • but if the sequence has been opened over 10 minutes ago (or less), show a popup telling the user he's taking too long and force close the sequence. It would work that way for morning/evening questionnaires and probes.

That way sequences don't get dismissed if the screen goes off, and the user can switch to something else while answering a probe, but still can't leave for too long if he wants to finish the current probe.

@MklBst
Copy link
Contributor

MklBst commented Oct 14, 2014

Sounds good. Sometimes I just turn my screen off mistakenly, and then yeah, I'd like to be able to get back to what I was editing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants