-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Current behavior
The step tracking foreground service always shows a persistent notification with the daily step count. There is no way to disable or hide it.
Note: There is already a notification style setting (Minimal/Detailed) in the Settings UI, and a NotificationStyle enum with MINIMAL and DETAILED variants — but the service currently ignores the preference and always uses MINIMAL.
Desired behavior
1. Allow disabling/hiding the notification
Since Android requires a notification for foreground services, fully removing it isn't possible. Options:
- Add a "Hidden" or "Off" notification style that sets the channel importance to
IMPORTANCE_MIN(shows only as a dot in the status bar, collapsed in the notification shade) - Or guide users to disable the notification channel via Android system settings
2. Wire up the existing notification style preference
The preference infrastructure is already built (PreferencesManager, Settings UI dropdown) but the service hardcodes NotificationStyle.MINIMAL. The service should read and react to the stored preference.
3. Consider additional notification content
The DETAILED style already shows steps + distance + activity. Potential additions to explore:
- Daily step goal progress (e.g., "7,432 / 10,000 steps") — requires a goal setting
- Calories burned estimate
- Active time duration
- Progress bar toward daily goal
Files involved
NotificationHelper.kt— builds notification contentNotificationStyle.kt— style enum (currently MINIMAL, DETAILED)StepTrackingService.kt— hardcodes MINIMAL instartForegroundWithNotification()andlaunchNotificationTicker()PreferencesManager.kt— stores notification style preference (already implemented)SettingsScreen.kt/SettingsViewModel.kt— settings UI (already implemented)