You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
The count on the phone:
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
The text was updated successfully, but these errors were encountered:
gmtavora
changed the title
[Bug]: Cannot set badge number on Samsung devices
[Bug]: Unable to set badge number on Samsung devices
Nov 16, 2024
Hi @gmtavora thanks for your patience. Is this still an issue for you? We will attempt to reproduce on a Samsung device. Curious, on the physical devices, what launcher are you using? There are some limitations on which launchers are supported. Thanks!
@jennantilla Thanks for your reply. Yes, it's still an issue. As a temporary workaround, I'm preventing the default behavior and creating the notification using native Android code. Interestingly, this method works on the device but not on the emulator, so now I don't think it has anything to do with Samsung's One UI, however, I don't have any other phones here to test it on. Maybe something related to ShortcutBadger being outdated, since Android 10 changed the way notifications are set up.
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:
The count on the phone:
Steps to reproduce?
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?
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: