首页 文章

本地通知未显示在React Native Android App中

提问于
浏览
0

我的本地通知未显示在Android模拟器中 . 我正在使用https://rnfirebase.io/的react-native-firebase . 我可以通过firebase控制台发送本地通知,并且它们可以正常显示 . 但是当我使用代码时

firebase.messaging().createLocalNotification({
            body: "body",
            icon: "ic_launcher",
            show_in_foreground: "true",
            title: "title",
            local_notification: "true",
            priority: "high",
            click_action:"ACTION"
        });

......没有任何显示

如果我使用 onMessage() 功能,我可以看到我'm receiving the notification, but I'没有在Android通知栏中看到通知 . 有没有人有通知和react-native-firebase转换酶库的经验?

1 回答

  • 1

    icon属性不能为空,并且该值必须存在于存储资源的项目中 . “真实”不应该有双引号 . 通知现在正常显示 .

相关问题