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()功能,我可以看到我正在接收通知,但我没有在 Android 通知托盘中看到通知。有没有人有通知和 react-native-firebase 转化酶库的经验?

4

1 回答 1

1

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

于 2018-01-05T16:49:38.640 回答