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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
As google says in this site, when app is in background notifications are administrated by the system by default :
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.