0
我正在使用cordova-plugin-firebase,当图标在标题栏中收到通知时显示良好,但是当我将手机的滑盖放下以查看通知时,图标在黑色圆圈内出现不同的白色正方形。 因此,任何机构都知道我是如何根据插件本身找到这个解决方案的,但是我不会拒绝它。如何使用cordova-plugin-firebase更改通知图标?
/res/native/android/res/values/styles.xml
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<!-- inherit from the holo theme -->
<style name="AppTheme" parent="android:Theme.Light">
<item name="android:windowDisablePreview">true</item>
</style>
<drawable name="notification_big">@mipmap/icon</drawable>
<drawable name="notification_icon">@mipmap/icon</drawable>
</resources>
和 /res/native/android/res/values-v21/styles.xml
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<!-- inherit from the material theme -->
<style name="AppTheme" parent="android:Theme.Material">
<item name="android:windowDisablePreview">true</item>
</style>
<drawable name="notification_big">@mipmap/icon</drawable>
<drawable name="notification_icon">@drawable/ic_silhouette</drawable>
</resources>
虽然此链接可以回答这个问题,最好是在这里有答案的主要部件,并提供链接以供参考。如果链接页面更改,则仅链接答案可能会失效。 - [来自评论](/ review/low-quality-posts/17278799) –
对不起,回复链接,但原始评论包含超过2个链接,我只能用最多两个链接 –