Skip to content

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

Description

@gmtavora

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions