Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unable to set badge number on Samsung devices #1762

Open
2 of 3 tasks
gmtavora opened this issue Nov 16, 2024 · 0 comments
Open
2 of 3 tasks

[Bug]: Unable to set badge number on Samsung devices #1762

gmtavora opened this issue Nov 16, 2024 · 0 comments

Comments

@gmtavora
Copy link

What happened?

I'm trying to override onNotificationReceived as suggested by the docs in order to manually set the notification badge number.

The provided repo works fine on the emulator, but on Samsung devices (tested with Android 14 and One UI 6.1) it does not override the default behavior of incrementing the count. I've also noticed that other methods like setColor and setProgress do work.

Screenshots

The correct behavior on the emulator:

Screenshot1

The count on the phone:

Screenshot2

Steps to reproduce?

1. Clone the repo https://github.com/gmtavora/onesignal-samsung-bug;
2. Change the app ID on App.tsx;
3. Install the app on a Samsung phone;
4. Send a push notification.

What did you expect to happen?

The badge number is not set to 10, as it should be (previously defined in NotificationServiceExtension.java).

React Native OneSignal SDK version

Release 5.2.6

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@gmtavora gmtavora changed the title [Bug]: Cannot set badge number on Samsung devices [Bug]: Unable to set badge number on Samsung devices Nov 16, 2024
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

No branches or pull requests

1 participant