0

I am developing a phonegap app and I want to show push notification count on app icon. I am using com.phonegap.plugins.pushplugin for receiving push notification.

I am trying to use this plugin https://github.com/katzer/cordova-plugin-badge for displaying badge.

But while building the app it fails and the log shows the following

[javac] /project/src/de/appplant/cordova/plugin/badge/BadgeImpl.java:33: error: package me.leolin.shortcutbadger does not exist [javac] import me.leolin.shortcutbadger.ShortcutBadger;

Can anyone help me in solving the issue? Thanks in advance.

mobiledevnewbie
  • 707
  • 1
  • 5
  • 11

1 Answers1

0

Add import me.leolin.shortcutbadger.ShortcutBadger; in the top of file "BadgeImpl.java" so that ShortcutBadger class is imported, this should fix the error. Otherwise try the latest version of cordova-plugin-badge, it should work fine.I did not get any errors while building with latest version (0.7.3).

But I found some different issue with that plugin, badge count is not getting added in Samsung device whereas its working with "ShortcutBadger" "SampleApp"! strange that plugin code is not yet updated with latest ShorcutBadger code!!

Just found another plugin cordova-plugin-android-badge-counter and its working in Samsung device as well. Try it :)

Chrome App
  • 86
  • 1
  • 12