[英]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.