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.
Move the check for setup_complete from the pluginInitialize to the sync
Before this, we would check and reinitialize the state machine when the plugin was initialized. But the plugin was only invoked when the user launched the app. If the app was silently upgraded in the background, then basically all tracking would be turned off until the user launched the app again. This change moves the setup_complete initialize check from plugin_initialize into the TripDiaryReceiver, where it will be called as part of validateAndCleanupState by the sync adapter. This will ensure that tracking starts at the next sync, and we get at most an hour of missing time. It may be possible for us to listen to package manager updates and do something smarter instead.
- Loading branch information
Showing
2 changed files
with
59 additions
and
18 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