Android notification white icon display for some device

403 Views Asked by At

I have used phone-gap push plugin for push notification, every things works find except icon display on device. white icon is display for notification on some device

1

There are 1 best solutions below

0
Hardik Bambhania On BEST ANSWER

You need to add all your notification icon in below all directories

res/drawable-mdpi/ (24x24)

res/drawable-hdpi/ (36x36)

res/drawable-xhdpi/ (48x48)

res/drawable-xxhdpi/ (72x72)

res/drawable-xxxhdpi/ (96x96)

res/drawable-xxxhdpi/ (256x256)

  • If you miss an icon size, it may not display correctly.
  • If you see a solid square, you set the image correctly, but did not generate with transparency in the shape you want to show.
  • If you see a white square in the preview on the page above you did not set the alpha channel correctly on your icon.
  • you must be sure the icon filenames are correct.

Small Icon If you prefer to create your own icons, you must make your icons the following size and colors:

Type Size (px) Small Notification Icon (mdpi)

24x24

Small Notification Icon (hdpi)

36x36

Small Notification Icon (xhdpi)

48x48

Small Notification Icon (xxhdpi)

72x72

Small Notification Icon (xxxhdpi)

96x96

Other - Large Icon Type Size (px) Large Notification Icon (xxxhdpi)

256x256

Batter to use below tool to generate notification icon. Android Asset Studio