leolin310148 / ShortcutBadger

An Android library supports badge notification like iOS in Samsung, LG, Sony and HTC launchers.
Other
7.35k stars 1.34k forks source link

Not working on samsung s7 running Android N 7.0 #199

Open praneeth-alla opened 7 years ago

praneeth-alla commented 7 years ago

Thanks for the library. It is not working on Samsung S7 running Android 7.0 OS

McLoo commented 7 years ago

Could you check https://play.google.com/store/apps/details?id=me.leolin.isbadgeworking and post the results?

divyanshunegi commented 7 years ago

it works in Samsung Galaxy s7 with Android 7.0 , I found the sollution is to provide the class name instead of the getApplicationContext() or even this

But I am not sure how to make it work when a notification comes into a service ?

ShortcutBadger.applyCount(YourActivity.this, badgeCount); yourActivity.this is important in Samsung devices.

I am still searching for a solution on how to make it work for a service. I tested but it does not work properly.

divyanshunegi commented 7 years ago

The Issue is fixed now, It was a FCM trouble in JSON, my service methods were not firing up in Samsung devices, now fixed, so this sollution works perfectly.

ShortcutBadger.applyCount(YourActivity.this, badgeCount); yourActivity.this is important in Samsung devices.