forked from e-mission/e-mission-data-collection
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for turning on tracking only after user consent
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
- Loading branch information
Showing
7 changed files
with
97 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters