Pushwoosh / pushwoosh-phonegap-plugin

Pushwoosh PhoneGap Build Plugin
Other
109 stars 139 forks source link

Android 6.0.1 badge not being updated #221

Closed rwillett closed 7 years ago

rwillett commented 7 years ago

Hi,

We can't get the Android badge to update when we call it directly using

pushNotification.setApplicationIconBadgeNumber(i);

We looked and saw #211 and thought that a new plugin 6.3.0 would fix it. This doesn't seem to be the case.

We can see the function being called and no error reported but nothing changes.

We have never tried to badge icons on Android before so we are wondering if there is something special to be done, the docs seem pretty clear though.

This is on Android Nexus 5 running Android 6.0.1.

Happy to provide as much information as needed.

wfhm commented 7 years ago

Hi,

Generally you need to add few permissions to your manifest to allow setting badges. Please have a look on the following doc:

http://docs.pushwoosh.com/docs/androidmanifestxml-modifications#using-badge-number-on-android

Were these permissions added when testing badge functionality on your device?

rwillett commented 7 years ago

Err...... No 😠

we hadn't seen that doc. We'll experiment and see what happens.

Thanks

wfhm commented 7 years ago

@rwillett Sorry for misguiding you! For vanilla Android badge functionality is not supported. The mentioned permissions are needed for different OS layouts (e.g. Samsung, Sony etc.) and are added to your Cordova project by default, so there is no need to manually add it.

rwillett commented 7 years ago

OK, fine. We knew that Android badges weren't normally supported so we thought we had missed something.

No problems. Actually less work now as no need to support Android badges :)

Rob