katzer / cordova-plugin-badge

Access and modify badge numbers
Apache License 2.0
408 stars 253 forks source link

not getting notification badge in phonegap app #101

Closed webtestdeveloper closed 6 years ago

webtestdeveloper commented 7 years ago

hello, I am using xiomi MI 5 device. And I am building app in phonegap. I am not getting notification badge.

check my code. function onDeviceReady() { cordova.plugins.notification.badge.hasPermission(function (granted) { alert("hasPermission granted"+ granted); }); cordova.plugins.notification.badge.set(10); }

katzer commented 7 years ago

@webtestdeveloper The real action is handled by the https://github.com/leolin310148/ShortcutBadger lib. The code looks ok. If you still can't see the badge, then ShortcutBadger cannot set the badge for (unknown) reason.

kernelogic commented 7 years ago

There is a WIKI on shortcutbadge saying xiaomi requires special treatement https://github.com/leolin310148/ShortcutBadger/wiki/Xiaomi-Device-Support

@katzer do you support this?

webloper commented 7 years ago

Dealing with same issue, every thing is working fine except I can't see badges. Tried isBadgeWorking and reported issue related this @katzer @kernelogic