作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
在 Android 上,当在对 NotificationManager.notify
的两次调用中提供相同的 id
时,通知抽屉中只会显示一条通知。
在 BlackBerry 上,在对 Notification()
的两次调用中提供相同的 标签
时, 消息中心只会显示一个通知。
iOS 上的等效功能是什么?
我们需要多次发送某些推送通知以使手机多次响铃和振动,但我们只想在锁定屏幕上显示一条消息。
最佳答案
iOS 上的方法在概念上与 Android 和 BlackBerry 非常相似。来自 Apple 的 APNs 概述:
To allow the coalescing of similar notifications, you can include a collapse identifier with the notification request.
具有相同标识符的通知将在接收设备上折叠。
关于ios - 如何将 "collapse"多个推送通知合并为一个?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25552898/
我是一名优秀的程序员,十分优秀!