我已经将OneSignal sdk集成到了我的react本机项目中,一切看起来都很好,除了当我们在推消息中添加标题时,安卓会收到双重推送通知。当我们发送没有标题的推送通知时,android会收到一个(按预期)。如有任何建议,我们将不胜感激。
编辑:
我的代码:
// App.js
OneSignal.setAppId("my-app-id");
//Method for handling notifications received while app in foreground
OneSignal.setNotificationWillShowInForegroundH
我使用了一个awesome_notification包的FCM通知,在处理onBackgroundMessage时我得到了两个通知。
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
createNotification(message);
}
FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);```
Below is the object we pass in se
我目前有一个phonegap应用程序,我正在使用pushPlugin和警报框来显示传入的推送通知。但是,我希望这些消息出现在设备状态栏中。我是否需要做一些额外的事情才能让它们出现在那里;也许是一些额外的配置?谢谢。
以下是使用警告框代码部分:
case 'message':
// if this flag is set, this notification happened while we were in the foreground.
// you might want to play a sound to get the user's a