How can I "collapse" multiple push notifications into one?

On Android, when delivering the same id

in two calls NotificationManager.notify

, only one notification will be shown in the notification drawer.

In BlackBerry, delivering the same tag

in two calls Notification()

will only show one notification in the message hub.

What is the equivalent functionality in iOS?

We need to press notifications multiple times for the phone to ring and vibrate multiple times, but we want only one message to appear on the lock screen.

+3


source to share


1 answer


The iOS method is very similar to Android and BlackBerry. From Apple APN Review:

To allow the merging of similar notifications, you can enable the collapse id with the notification request.



Notifications with the same ID will be minimized on the receiving device.

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html#//apple_ref/doc/uid/TP40008194-CH8-SW1

+1


source







All Articles