Android 8 (Oreo) 上未显示混合应用推送通知图标

Hybrid app push notification icon not showing on Android 8 (Oreo)

从 IBM MobileFirst 服务器向具有 Android 8 OS 的设备发送推送通知时,显示的不是应用程序图标,而是移动图标。在 Android 6(Marshmallow) 和几个 iOS 版本上进行了测试,它显示了正确的图标。我还没有用 Android 7(Nougat) 测试过它。它是一个使用 Cordova(7.1.0) + ReactJS 的混合应用程序。

显然,cordova-plugin-mfp-push 插件提供了默认通知图标 name push_notification_icon.png,这不是来自标准 Android minmap。我在 config.xml 中使用并指定 src="my icon location path" 和 target="android/res/drawable-{sizes}/push_notification_icon.png" 来替换那些默认图标。

在您的 android 应用程序中用 push_notification_icon.png 替换您的应用程序图标 --> 具有相同名称的可绘制对象。