Fixed Push Notification Icon showing White Android

Avoid white icon

Danish Amjad
AndroidPub

--

Credits:

As we already know that this is the old problem, actually this is not a problem. This is what we need to do a proper implementation.

Why I’m writing this article is just because I have seen in many applications the push notification icon is showing the white icon when we run this in android 6.0 and greater versions.

We always need to be updated on the things according to the OS versions of Android. As we know that Android new OS versions coming rapidly with the new change so we need to change accordingly.

Without wasting the time let’s dig into the implementation, we just need to change the two things.

Implementation of Notification Builder for below and above Lollipop OS version would be:

We just need to change the small icon and color for notification according to the OS versions like below code:

Note:

--

--

Danish Amjad
AndroidPub

Senior Mobile Engineer (Android). Open Source Contributor, Technical Writer, ✉️ Dani.amjad12@gmail.com 🔗 https://danishamjad12.github.io