Skip to content

fix(notify): use ActivityWatch logo as notification small icon - #227

Open
0xbrayo wants to merge 1 commit into
ActivityWatch:masterfrom
0xbrayo:fix/notification-icon
Open

fix(notify): use ActivityWatch logo as notification small icon#227
0xbrayo wants to merge 1 commit into
ActivityWatch:masterfrom
0xbrayo:fix/notification-icon

Conversation

@0xbrayo

@0xbrayo 0xbrayo commented Aug 14, 2026

Copy link
Copy Markdown
Member

Problem

The foreground-service notification (BackgroundService) and activity-time alerts (NotifyWorker) used R.mipmap.aw_launcher_round as setSmallIcon().

On API 26+ that resource is an adaptive-icon XML. Status-bar icons are alpha-only, so Android rendered a white blob or fell back to the default robot — not the ActivityWatch logo.

Fix

Add a white-on-transparent ic_stat_notification drawable (official AW clock / A / W mark, all densities) and use it as the small icon in both notification builders.

Change

- .setSmallIcon(R.mipmap.aw_launcher_round)
+ .setSmallIcon(R.drawable.ic_stat_notification)

Closes #226

@greptile-apps

greptile-apps Bot commented Aug 14, 2026

Copy link
Copy Markdown

Greptile Summary

The PR replaces adaptive launcher icons with dedicated notification-status icons for the foreground service and activity-time alerts.

  • Updates both notification builders to reference R.drawable.ic_stat_notification.
  • Adds correctly scaled PNG resources for mdpi through xxxhdpi.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The new drawable is available to all build variants, covers every standard density, uses valid density-appropriate PNG dimensions, and is a supported small-icon resource throughout the app's API range.

Important Files Changed

Filename Overview
mobile/src/main/java/net/activitywatch/android/BackgroundService.kt Uses the new dedicated drawable for the lifecycle-critical foreground-service notification; no issue identified.
mobile/src/main/java/net/activitywatch/android/workers/NotifyWorker.kt Uses the same dedicated drawable for activity-threshold notifications; no issue identified.
mobile/src/main/res/drawable-mdpi/ic_stat_notification.png Adds a valid 24×24 RGBA notification icon for mdpi.
mobile/src/main/res/drawable-hdpi/ic_stat_notification.png Adds a valid 36×36 RGBA notification icon for hdpi.
mobile/src/main/res/drawable-xhdpi/ic_stat_notification.png Adds a valid 48×48 RGBA notification icon for xhdpi.
mobile/src/main/res/drawable-xxhdpi/ic_stat_notification.png Adds a valid 72×72 RGBA notification icon for xxhdpi.
mobile/src/main/res/drawable-xxxhdpi/ic_stat_notification.png Adds a valid 96×96 RGBA notification icon for xxxhdpi.

Reviews (1): Last reviewed commit: "fix(notify): use ActivityWatch logo as n..." | Re-trigger Greptile

@0xbrayo
0xbrayo force-pushed the fix/notification-icon branch from 97745f3 to cb9bb56 Compare August 14, 2026 21:19
The foreground-service and time-alert notifications used the adaptive
launcher mipmap as setSmallIcon(). Android status-bar icons are
alpha-only, so that rendered as a white blob or the default robot.
@0xbrayo
0xbrayo force-pushed the fix/notification-icon branch from cb9bb56 to a5751af Compare August 14, 2026 21:31
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.

Notifications don't display AW icon

1 participant