FCM 令牌是否特定于应用程序或设备?
Are FCM tokens specific to an App or a Device?
我不清楚 FCM 令牌是特定于设备,还是设备上的特定应用。在我读过的关于这个主题的大部分文档中,它说 FCM 令牌用于 "target a specific device",但这是否意味着当使用该令牌时,设备上的每个应用程序都可以收到通知?或者只是首先请求令牌的应用程序?
它是应用程序(来自 firebase 配置的 uniq)和设备的令牌。
例如,如果您使用两个不同的 firebase 配置创建 2 个应用程序,但您从同一设备请求令牌,则该服务将为您提供两个不同的令牌。
明确一点:当 Firebase 文档使用术语 "device" 时,它通常表示 "app instance [on a device]"。因此,以下文档:
Register devices to receive messages from FCM. An instance of a client app registers to receive messages, obtaining a registration token that uniquely identifies the app instance.
...更准确地说:
Register app instances to receive messages from FCM. An instance of a client app registers to receive messages, obtaining a registration token that uniquely identifies the app instance.
这也适用于许多其他移动通知文档,包括 Microsoft 的通知中心文档。
我不清楚 FCM 令牌是特定于设备,还是设备上的特定应用。在我读过的关于这个主题的大部分文档中,它说 FCM 令牌用于 "target a specific device",但这是否意味着当使用该令牌时,设备上的每个应用程序都可以收到通知?或者只是首先请求令牌的应用程序?
它是应用程序(来自 firebase 配置的 uniq)和设备的令牌。 例如,如果您使用两个不同的 firebase 配置创建 2 个应用程序,但您从同一设备请求令牌,则该服务将为您提供两个不同的令牌。
明确一点:当 Firebase 文档使用术语 "device" 时,它通常表示 "app instance [on a device]"。因此,以下文档:
Register devices to receive messages from FCM. An instance of a client app registers to receive messages, obtaining a registration token that uniquely identifies the app instance.
...更准确地说:
Register app instances to receive messages from FCM. An instance of a client app registers to receive messages, obtaining a registration token that uniquely identifies the app instance.
这也适用于许多其他移动通知文档,包括 Microsoft 的通知中心文档。