<GNSSubscription> 协议
订阅对象表示从附近设备订阅特定类型的消息的行为。
只要消息存续,消息库就会尽可能传送与订阅类型匹配的消息,前提是满足所需条件(例如,应用必须在前台)。当发现或丢失消息时,系统会调用消息处理程序。释放订阅对象后,消息传送将停止。
此类继承 <NSObject>。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-12-02。
[null,null,["最后更新时间 (UTC):2023-12-02。"],[[["The GNSSubscription protocol enables subscribing to specific message types from nearby devices."],["Active subscriptions trigger message delivery to the app, primarily when it's in the foreground, based on defined criteria."],["Message handlers manage the discovery and loss of messages, ensuring appropriate actions are taken."],["Deallocation of the subscription object halts further message delivery to the application."]]],["A subscription object enables receiving specific message types from nearby devices. The messages library actively delivers matching messages while the subscription is active, under certain conditions (e.g., app foreground). Message handlers are triggered upon message discovery or loss. Deallocating the subscription object stops message delivery. It inherits from `NSObject`.\n"]]