Google 推送通知:停止通知
Google Push Notifications: stop notifications
我正在使用 Google 日历 API,但我在使用 Google Calendar Push Notifications 时遇到问题。
当我发出监视请求时,我必须向 Google 发送 Channel Id
并且 Google 在响应中向我发送 Resource Id
。
如果我想停止频道的通知,我必须同时向 Google 发送 Channel Id
和 Resource Id
。
如果我丢失这两个值之一,我将无法停止频道。
有没有办法停止所有频道或只知道 Channel Id
的频道?
编辑:
解决方案很简单...我可以从通知中获取频道 ID 和资源 ID,然后我可以停止频道。
到目前为止,当您检查documentation时,请求正文中需要提供的结构是:
{
"id": string,
"resourceId": string
}
我认为这是停止通知所必需的,目前在 Google 日历 API 中受支持。
你可以关注这个,这与你的问题有关。
我正在使用 Google 日历 API,但我在使用 Google Calendar Push Notifications 时遇到问题。
当我发出监视请求时,我必须向 Google 发送 Channel Id
并且 Google 在响应中向我发送 Resource Id
。
如果我想停止频道的通知,我必须同时向 Google 发送 Channel Id
和 Resource Id
。
如果我丢失这两个值之一,我将无法停止频道。
有没有办法停止所有频道或只知道 Channel Id
的频道?
编辑:
解决方案很简单...我可以从通知中获取频道 ID 和资源 ID,然后我可以停止频道。
到目前为止,当您检查documentation时,请求正文中需要提供的结构是:
{
"id": string,
"resourceId": string
}
我认为这是停止通知所必需的,目前在 Google 日历 API 中受支持。
你可以关注这个