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

Prompt user to allow notifications to remind them to turn on tracking? #121

Open
shankari opened this issue Jul 26, 2016 · 0 comments
Open

Comments

@shankari
Copy link
Contributor

The original plan for e-mission consent, and the current implementation on android, envisaged that if the user did not consent to the data collection, we would prompt periodically to turn on data collection.

However, this is not easily achievable on iOS. On iOS, we do not receive notifications until the user has consented. We don't want to pop up the prompt to consent for notifications during pluginInitialize, because at that point, they haven't even got a chance to read the summary yet. We don't notify the native code of the transition between the summary page and the consent document, so we can't prompt then.

The real solution appears to be to prompt when the user says that they disagree. That's a useful hook into the data collection as well - markNotConsented in addition to markConsented, but I am not sure that I want to tackle that additional work right now. In particular, it is not clear that people will say "Yes", and we need to handle and test the case in which they say "No".

It is also not clear that prompting people continously to turn on tracking is a great user experience.

So for now, we bail on this for iOS. iOS and android behavior will be different and we will unify based on what people think. On iOS, if the user says that they disagree, there will be no further prompts or interaction until they launch the app again.

shankari added a commit to shankari/e-mission-data-collection that referenced this issue Jul 26, 2016
This, combined with
e-mission/e-mission-phone#87
should largely resolve https://github.com/e-mission/e-mission-phone/issues/43

It also provides additional functionality, including for turning off tracking
on re-approval until the user re-consents.

The steps for the changes are:
- Add support for get/set consented to the config manager
- Use that to trigger/defer state machine init on android and iOS
    - on iOS, if not consented, then the data collection plugin is not initialized
    - on android, if not consented, then all `initialize` transitions are ignored, so the state machine is never initialized.
- new javascript interface that indicates when the user has approved, and an
  implementation that saves the consent to the usercache and turns on tracking

On android, we are prompted for re-consent. On iOS, if this is a reconsent, I
think that we will be prompted, because the user has already consented to
receive notifications. But on iOS, if this is the initial consent, and the user
disagrees, then we won't be prompted because the user would not have signed up
for remote notifications.

The inconsistency in prompting is tracked in
e-mission#121
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant