升级到android sdk到v26后,通知图标变为白色框,我们通过使用白色/透明图标解决了这个问题。
然而,在三星手机上,推送通知中的小图标是绿色机器人。在推送通知使用大图标(白色/透明)的所有其他手机中,它完美运行。
我们如何解决三星问题?
我在用:
我有:
android.manifest中的对应行:
<application
android:name=".MainApplication"
android:allowBackup="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme">
<meta-data
android:name =
"com.google.firebase.messaging.default_notification_icon"
android:resource="@mipmap/ic_notification"
/>
<meta-data
android:name =
"com.google.firebase.messaging.default_notification_color"
android:resource="@color/orange"
/>
尝试将react-native版本更改为0.55.4。较新的版本可能有图标问题。
经过几个小时我们解决了这个问题:
implementation 'com.google.firebase:firebase-messaging:17.3.1'
implementation 'com.google.firebase:firebase-core:16.0.3'