简体   繁体   English

FCM:我已使用FCM接收有关我的应用程序的通知。 当我的应用程序处于前台时,它将所有通知分组,但不将其组合到后台时

[英]FCM: I have used FCM to receive notification for my app. When my app is in foreground it groups all notifications but not when app is in background

I am able to group notifications for my app when it is in foreground. 当我的应用程序处于前台时,我可以对其进行分组通知。 Whenever the app goes in background it creates multiple notification. 每当应用在后台运行时,它都会创建多个通知。 How can I fix this? 我怎样才能解决这个问题?

As google says in this site , when app is in background notifications are administrated by the system by default : 就像google在这个网站上所说的那样,当应用程序在后台运行时,系统默认会管理通知:

Notifications delivered when your app is in the background. 当您的应用在后台运行时发出的通知。 In this case, the notification is delivered to the device's system tray. 在这种情况下,通知将传递到设备的系统托盘。 A user tap on a notification opens the app launcher by default. 用户点击通知会默认打开应用启动器。

But if you want to work with the notifications by "yourself" you should send the 'data message' instead of the 'notification' as is said here and you can handle the notification. 但是,如果您想通过“您自己”来处理通知,则应发送“数据消息”而不是此处所述的“通知”,然后您可以处理通知。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当应用处于前台时,无法接收FCM通知 - Not able to receive FCM notifications when app is in foreground 当应用程序在前台时未收到FCM推送通知,但在应用程序在后台时收到 - FCM Push notification didn't receive when app is in foreground but receive when app in background 当我的应用程序前台服务被终止时,未收到 FCM 通知 - FCM Notification is not received when my app foreground service is killed 当应用程序在前台而不是后台时,FCM通知,通知单击 - FCM notification, notification click when app is in foreground not background 当应用程序处于前台或后台时如何使用 FCM 处理通知 - How to handle notifications with FCM when app is in either foreground or background 当App位于前台时,FCM推送通知将被替换 - FCM Push Notifications are replacing when App is in Foreground 当应用程序处于后台时,我的FCM通知不会扩展 - My FCM notification does not expand when the app is in background 在前台在后台收到FCM通知时应用崩溃 - App Crashes when receiving FCM Notification on Foreground works on Background 我如何仅在应用程序终止时接收 FCM 通知,如果应用程序在后台运行则不接收它 - How I can receive FCM notification only when app is terminated and doesn't receive it if app is working in background 退出应用程序时收到FCM的通知 - Receive notification by FCM when exit the app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM