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

🔥 Single-line changes to remove notification checks in the background checker #238

Merged
merged 4 commits into from
Oct 7, 2024

Conversation

shankari
Copy link
Contributor

@shankari shankari commented Oct 7, 2024

As part of e-mission/e-mission-docs#1094, we made the notification permission optional.

Since it is not required for silent push notifications, notifications are nice-to-have. They are still helpful to ensure that people know if there are issues, and hopefully help them label their trips, but the app will still work if the permission is turned off.

Since this is no longer required for normal operation, we don't need to check it in the background every hour, and nag the user to fix it if it is turned off. This is a super-easy change (two lines), so rolling this in while fixing e-mission/e-mission-docs#1094 instead of coming in as a future fix.

Bonus fix: Use the ExplicitIntent wrapper in the geofence exit intent service to be consistent with all the other locations.

Build on e-mission@01c746e
by using the ExplicitIntent wrapper that adds the package name. It looks like
we handled this earlier, but forgot this location
…hecker

As part of e-mission/e-mission-docs#1094, we made the
notification permission optional.

Since it is not required for silent push notifications, notifications are
nice-to-have. They are still helpful to ensure that people know if there are
issues, and hopefully help them label their trips, but the app will still work
if the permission is turned off.

Since this is no longer required for normal operation, we don't need to check
it in the background every hour, and nag the user to fix it if it is turned off.
This is a super-easy change (two lines), so rolling this in while fixing
e-mission/e-mission-docs#1094 instead of coming in as
a future fix.

Testing done:
- Replaced the data collection plugin with the most recent version
- Code compiles
- Wasn't able to test in the emulator since with the permission turned off, without
    e-mission/e-mission-phone#1182 in place, we got a
    prompt to fix the notification, so we couldn't simulate a remote push

Pushing this and testing all the changes together
@shankari shankari force-pushed the fix_foreground_service branch from 2f6c83e to ca208b5 Compare October 7, 2024 20:39
Build on e-mission@01c746e
by using the ExplicitIntent wrapper that adds the package name. It looks like
we handled this earlier, but forgot this location
@shankari
Copy link
Contributor Author

shankari commented Oct 7, 2024

@JGreenlee if you think this looks good, I can pull this, your changes, bump up the release and get a new version on to staging ASAP

Copy link
Contributor

@JGreenlee JGreenlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shankari shankari merged commit f077f3e into e-mission:master Oct 7, 2024
shankari added a commit to shankari/e-mission-data-collection that referenced this pull request Oct 7, 2024
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

Successfully merging this pull request may close these issues.

2 participants