phonegap / phonegap-plugin-push

Register and receive push notifications
MIT License
1.94k stars 1.91k forks source link

badge disappears on opening the app in android #2827

Open prasanthmpr opened 5 years ago

prasanthmpr commented 5 years ago

Expected Behaviour

Badge should be displayed until clear manually

Actual Behaviour

Badge is being displayed when the notification receive's and it's getting cleared after opening the app.

Reproduce Scenario (including but not limited to)

  1. Initialise the push plugin
  2. Initialise the push.on("notification") method
  3. Call push. setApplicationIconBadgeNumber method upon receiving the notification(Bade will be set here).
  4. Open the app and check the badge count, it's disappeared alrady

Platform and Version (eg. Android 8,9)

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

Most of the latest devices.

Cordova CLI version and cordova platform version

cordova --version                                    # e.g. 8.1.2
cordova platform version android                     # e.g. 7.1.2

Plugin version

cordova plugin version | grep phonegap-plugin-push   # e.g. 2.2.3