cordova-plugin-badge icon indicating copy to clipboard operation
cordova-plugin-badge copied to clipboard

Get badge return 0 Android

Open clemishow opened this issue 6 years ago • 3 comments
trafficstars

I use Ionic and OneSignal for push notifications.

All in the title. Test on a real Android 8.0.0 Samsung S9.

cordova-plugin-badge 0.8.8
onesignal-cordova-plugin 2.4.6
Ionic:

   ionic (Ionic CLI)  : 4.7.1 (/Users/neocityclement/.virtualenvs/my-app/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.0

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 6.4.0, ios 4.5.5
   Cordova Plugins       : cordova-plugin-ionic 4.1.7, cordova-plugin-ionic-webview 1.2.1, (and 25 other plugins)

System:

   Android SDK Tools : 26.1.1 (/Users/dev/Library/Android/sdk)
   ios-deploy        : 1.9.4
   NodeJS            : v10.15.0 (/Users/dev/.virtualenvs/my-app/bin/node)
   npm               : 6.4.1
   OS                : macOS Mojave
   Xcode             : Xcode 10.1 Build version 10B61

clemishow avatar Jan 18 '19 16:01 clemishow

But what's your issue? The plugin only returns correct badge number if it was set through the plugin itself (on Android because Android has to API for it).

katzer avatar Jan 18 '19 16:01 katzer

Onesignal push notification increase the badge notification by one, which is visible on app icon. But when I try to get badge notification on Android with Badge.get()it returns 0

clemishow avatar Jan 18 '19 16:01 clemishow

I have the same issue, I'm using OneSignal and Badge for Ionic 3. Badge.get() always returns 0.

ghost avatar May 29 '19 02:05 ghost