Your icon issue in Android 15 likely stems from two factors:
Incorrect Build Action: You have the build action set to 'None' - it should be 'AndroidResource' for drawable resources.
Icon Compliance: While Android has required monochrome notification icons since version 5.0, Android 15 may enforce this more strictly. Your icon that worked in Android 14 might not be fully compliant (perhaps it has some gray/colored pixels instead of pure white), and Android 15's stricter validation is now rejecting it.
Here are solution steps you can try:
- Create and use a new icon file:
Create a new PNG icon file and adheres the following rule:
- The icon must be solid white color
- The background must be completely transparent
- Use an SVG or a high-resolution PNG file to ensure it looks good on all screen densities. The recommended size is 24x24 dp.
You can use tool like Android Asset Studio to easilly generate a proper notification icon.
- Add the new icon to your project
- Save this new, monochrome icon file.
- Place it in your
Platforms/Android/Resources/drawable
folder. - Name it something like
ic_notification_small.png
. - Ensure its build action is set to AndroidResource.
- Update your code
- Update your C# code to reference to this icon:
private void CreateNotificationChannel()
{
try
{
var channelId = $"{PackageName}.general";
var notificationManager = (NotificationManager)GetSystemService(NotificationService);
var channel = new NotificationChannel(channelId, "General", NotificationImportance.Default);
notificationManager.CreateNotificationChannel(channel);
FirebaseCloudMessagingImplementation.ChannelId = channelId;
// Update this line to point to your new monochrome icon.
FirebaseCloudMessagingImplementation.SmallIconRef = global::ProjectNameSpace.Resource.Drawable.ic_notification_small;
}
catch (Exception exception)
{
Utility.SendCrashReport(exception);
}
}
4. Rebuild the project
- Clean and rebuild your project to ensure the new resources are properly integrated.
These changes should provide Android 15 with a compatible icon that displays correctly in the notification area.
Here are some useful source you can find:
- Android Adaptive Icon
- Create your app icons
- Older Android 13+ color relate issue
- Google could change up how Android shows notifications in the status bar
- Android 15 brings even more improvements to Material You design
I hope this help! Let me know if you have any question