Transparent or white notification icons from Android 5 and above

281 views
Skip to first unread message

WizRocket support

unread,
May 6, 2015, 3:28:49 AM5/6/15
to wizr...@googlegroups.com

With the launch of Android 5 (Lollipop), the notification icons are rendered differently in the notification bar at the top.

By default, our SDK uses the app's icon for both, the notification icon as well as the notification bar icon. However, since Android 5, all non-alpha channels are ignored while drawing the main notification icon. See here for more details.

To set a custom notification icon (only for small icon), add the following meta data entry in your AndroidManifest.xml:

        <meta-data
               
android:name="WIZROCKET_NOTIFICATION_ICON"
               
android:value="ic_stat_red_star"/>

Please note that the value is the name of the image file in your drawable directory (excluding the file extension). Do not attempt to use @drawable/ic_stat_red_star. It will not work. 

Reply all
Reply to author
Forward
0 new messages