Skip to content

fix(badge): create Android badge notification channel - #857

Closed
ericyewang wants to merge 1 commit into
capawesome-team:mainfrom
ericyewang:fix/android-badge-set-before-notification
Closed

fix(badge): create Android badge notification channel#857
ericyewang wants to merge 1 commit into
capawesome-team:mainfrom
ericyewang:fix/android-badge-set-before-notification

Conversation

@ericyewang

Copy link
Copy Markdown

Pull request checklist

  • The changes have been tested successfully.
  • A changeset has been created (npm run changeset).
  • I have read and followed the pull request guidelines.

What changed

  • Create a badge-enabled notification channel on Android 8+ before ShortcutBadger runs its support check or applies a count.
  • Reuse the same apply path for set and persisted-count restore so Badge.set({ count }) can prepare badge support before any app notification is posted.

Closes #3.

Testing

  • git diff --check
  • JAVA_HOME=/Applications/StataNow/utilities/java/macos-arm64/zulu-jdk21.0.7/zulu-21.jdk/Contents/Home ./gradlew test (blocked by TLS handshake failures while resolving Gradle dependencies from dl.google.com and Maven Central in this environment)

@robingenz

Copy link
Copy Markdown
Member

I’ve just tested it, and unfortunately it doesn’t work as expected. Creating a badge via a notification channel would also require an active notification, which is out of scope for this plugin.

@robingenz robingenz closed this Aug 12, 2026
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.

bug(badge): set(...) only works after creating a notification.

2 participants