Skip to content

Improve notification: allow disabling and add more detail options #14

@JanJetze

Description

@JanJetze

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 content
  • NotificationStyle.kt — style enum (currently MINIMAL, DETAILED)
  • StepTrackingService.kt — hardcodes MINIMAL in startForegroundWithNotification() and launchNotificationTicker()
  • PreferencesManager.kt — stores notification style preference (already implemented)
  • SettingsScreen.kt / SettingsViewModel.kt — settings UI (already implemented)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions