世博会独立应用程序:不显示通知图标 [英] expo standalone app: notification icons don't show up show up
问题描述
我有一个独立的android和ios应用.
I have a standalone android and ios app.
当前在android上测试推送通知.
currently testing push notifications on android.
我已使用以下通知键设置了app.json
I have setup my app.json with the following notification key
"notification":{
"icon": "./app_assets/icons/icon-48-gs.png",
"color": "#000000"
},
上方的图标是带有透明度的48x48灰度图标. 我也尝试了没有颜色属性. 我在状态栏和实际通知中都得到的是白色/浅灰色/黑色正方形.
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.
在博览会论坛上,我看到其他人提到他们使用96x96大小的图标解决了此问题.这根本没有帮助.
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?
根据下面@Raaj Nadar的评论进行更新,这是我尝试过的图标.
Update per @Raaj Nadar's comment below, Here are the icons i have tried.
推荐答案
expo的官方文档已更新为正确的信息.
The official docs of expo is updated with proper information.
图像应为灰度,表示黑白!为什么?
RGB(32位)-建议采用这种颜色模式,以便在屏幕上显示图像.
RGB (32 bit) - This color mode is recommended form displaying images on screen.
CMYK(32位)-当要打印图像时,建议使用此颜色模式.
CMYK (32 bit) - This color mode is recommended when the image is to be printed.
灰度(8位)-仅黑白专有名词是单色.
在SDK级别21中,根据状态栏颜色,将显示深灰色或纯白色的彩色图像(32位).从SDK级别21开始,Android和iOS建议仅使用灰度图像.
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 bar icon turns white in Android 5 Lollipop
这篇关于世博会独立应用程序:不显示通知图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!