Olivier Olivier - 1 year ago 153
Android Question

White notification icon for Android with Phonegap Build and PushPlugin

I'm messing around with Phonegap using Adobe's Build service and I was wondering if (and if so, how) I could make my notifications display a white icon (as Google describes here). I'm using the PushPlugin but I couldn't find any documentation on this. At the moment my app just displays the launcher icon next to the notification content.

So does anyone know if there's some way to enable an alternate notification icon with the PushPlugin, am I stuck with the launcher icon or is there another plugin with this feature?


Answer Source

If you're using Build's PushPlugin; local modifications to .setSmallIcon()#100 will be lost.

Unless you build locally or use an alternative GCM plugin, you're restricted to modifying:

title    extras.getString("title")
message  extras.getString("message")
msgcnt   extras.getString("msgcnt")
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download