My app icon is blue/red and when I receive a push notification the icon on status bar is the same app icon(blue/red). I want the icon of the status bar be a transparent and white version.
My ionic project is using this cordova plugin to receive push notifications. The official docs of the plugin theres nothing about how to configure the icon of the status bar notification.
Looks like what you’d want isn’t possible with that library.
According to the documentation, the notification icon is automatically set to your app’s small icon (Icon-Small.png
):
In the banner, iOS displays your notification message and the small version of your app icon.
Unless you change the small version of the app icon, this is not possible at all on iOS.
Using the Android APIs this would be simple with Notification.Builder#setSmallIcon(int)
, but the library you’re using hard-codes that icon to the application’s icon.
You’d need to modify the library to accept other icons. It’s likely that this has not been implemented so that the behaviour would be consistent on all platforms.
UPDATE
Now with this plugin is completely possible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With