Skip to content

Commit

Permalink
Single-line changes to remove notification checks in the background c…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
shankari committed Oct 7, 2024
1 parent b0850bf commit 2f6c83e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ public static void checkAppState(final Context ctxt) {
SensorControlChecks.checkLocationPermissions(ctxt),
SensorControlChecks.checkIgnoreBatteryOptimizations(ctxt),
SensorControlChecks.checkMotionActivityPermissions(ctxt),
SensorControlChecks.checkNotificationsEnabled(ctxt),
};
boolean allOtherChecksPass = true;
for (boolean check: allOtherChecks) {
Expand Down
3 changes: 1 addition & 2 deletions src/ios/Verification/SensorControlBackgroundChecker.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ +(void)checkAppState
@([TripDiarySensorControlChecks checkLocationSettings]),
@([TripDiarySensorControlChecks checkLocationPermissions]),
@([TripDiarySensorControlChecks checkMotionActivitySettings]),
@([TripDiarySensorControlChecks checkMotionActivityPermissions]),
@([TripDiarySensorControlChecks checkNotificationsEnabled])
@([TripDiarySensorControlChecks checkMotionActivityPermissions])
];
BOOL allChecksPass = TRUE;
for (NSNumber* check in allChecks) {
Expand Down

0 comments on commit 2f6c83e

Please sign in to comment.