How to Fix White or Blank Push Notification Icons in Android FCM Apps

Android developers using Firebase Cloud Messaging (FCM) often encounter a white square or blank icon in push notifications instead of the expected app icon. This occurs because Android requires notification icons to be small, monochrome images with a transparent background, unlike full-color app launcher icons. The fix involves two steps: declaring a default notification icon in the AndroidManifest.xml file and adding a properly formatted ic_notification.png image to all Android drawable density folders. Each density folder — mdpi, hdpi, xhdpi, xxhdpi, and xxxhdpi — must contain the icon so Android can select the right resolution for different devices. Using a dedicated notification icon with a white foreground and transparent background, rather than the app launcher icon, resolves the display issue.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in