1

我使用 PushSharp 发送推送通知。

我调用 PushService 对象的方法 StopAllServices 让它发送消息。

我假设在 PushService.StopAllServices 完成后,我得到了所有通知对象的响应。

之后我杀死了实例化 PushService 对象的线程。

PushService = New PushService()
...
...
...

PushService.StopAllServices(True)
...
'the thread dies here

我注意到有时我在回调函数中没有得到响应。

可能是 StopAllServices 方法不等待所有响应(来自 APNS/GCM)吗?

我需要收到所有通知对象的响应。如何做到这一点?我会很高兴的 sugestions

4

1 回答 1

1

从 Apple 推送服务 (APNS) 中,您不会收到所有成功发送的通知的响应,这是“设计使然”。 Redth(pushSharp 的作者)发布了对此的详细解释:http
://redth.info/the-problem-with-apples-push-notification-ser/ 所以你几乎永远不会得到一个响应-per-notification-无论如何发送,等待所有答案停止服务没有用。

请记住,将通知传递给提供者(android/apple/microsoft)并不能保证通知的有效设备传递......

于 2013-02-12T05:14:23.480 回答