gpt4 book ai didi

ios - 如何将 "collapse"多个推送通知合并为一个?

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:17:39 24 4
gpt4 key购买 nike

在 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.

具有相同标识符的通知将在接收设备上折叠。

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

关于ios - 如何将 "collapse"多个推送通知合并为一个?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25552898/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com