Conversation
Documents the support classes, DI module, manifest permissions, and Gradle changes needed to implement "snooze until home" via the Android Geofencing API. User will wire in the UI integration separately. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds test file specifications for HomeLocationStoreTest, GeofenceRegistrarTest, LocationSnoozeProcessorTest, and GeofenceBroadcastReceiverTest following the existing Robolectric+Mockito pattern. Also clarifies that GeofencingClient testability is already covered by DI constructor injection. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduces the infrastructure for "snooze until home" via the Android Geofencing API: - HomeLocation / HomeLocationStore: persist home coordinates and pending snoozed reminders in SharedPreferences as JSON - GeofenceRegistrar: register/unregister the home geofence via the injected GeofencingClient and GoogleApiAvailability (fully mockable) - LocationSnoozeProcessor: re-fires snoozed reminders on geofence entry by exploiting AlarmProcessor's immediate-broadcast short-circuit - GeofenceBroadcastReceiver: Hilt-injected receiver for OS geofence events - LocationModule: Hilt bindings for GeofencingClient, GoogleApiAvailability, and Gson - Unit tests for all four classes (Robolectric + Mockito) - Manifest: ACCESS_FINE/COARSE/BACKGROUND_LOCATION permissions + receiver declaration - Gradle: play-services-location 21.3.0 dependency Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ReminderNotificationData and HomeLocationStore now use List<Int> / MutableList<Int> instead of IntArray. Updated all test call sites to use listOf / mutableListOf accordingly and replaced contentEquals checks with assertEquals for list comparison. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a "Location-based snooze" toggle to the notification settings screen. Tapping ON checks Play Services availability and that a home location is set, then walks the user through the two-step location permission flow (fine → background on API 29+). Permissions denied or geofence registration failure reverts the switch. Toggling OFF unregisters the geofence. onResume reverts the switch if location permissions were revoked from system settings. Also: expose GeofenceRegistrar.hasRequiredPermissions() as internal, add LOCATION_SNOOZE_ENABLED constant to PreferencesDataSource, add five new string resources. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
# Conflicts: # .gitignore
Contributor
Android test fix
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1079