Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

expo standalone app: notification icons don't show up show up

I have a standalone android and ios app.

currently testing push notifications on android.

I have setup my app.json with the following notification key

"notification":{
      "icon": "./app_assets/icons/icon-48-gs.png",
      "color": "#000000"
    },

the icon above is a 48x48 greyscale icon with transparency. i tried also without color attribute. all i get in both the status bar and in the actual notiification is a white/light grey/black square.

grey square only

in the expo forums i saw others mention they solved this issue with a 96x96 sized icon. this did not help at all.

https://forums.expo.io/t/push-notifications-missing-icon-on-android/9170

https://forums.expo.io/t/android-notification-status-bar-icon-too-small/7175

Can someone please help provide guidance on what the issue might be?


Update per @Raaj Nadar's comment below, Here are the icons i have tried.

enter image description here enter image description here enter image description here enter image description here

like image 664
w-- Avatar asked May 30 '18 14:05

w--


1 Answers

enter image description here

The official docs of expo is updated with proper information.


The image should be in grayscale meaning black and white! Why?

RGB (32 bit) - This color mode is recommended form displaying images on screen.

CMYK (32 bit) - This color mode is recommended when the image is to be printed.

Grayscale (8 bit) - Only black and white Proper term is monochrome color.

From SDK level 21 colorful images (32 Bit) will be visible in dark gray color or plain white according to the status bar color. From SDK level 21 only grayscale images are recommended by android and iOS.

Notification icon in Android 5.0 is just a white square

Notification bar icon turns white in Android 5 Lollipop

Check the notification section in docs.expo.io

like image 94
Rajendran Nadar Avatar answered Nov 16 '22 03:11

Rajendran Nadar