Ways to guess if C2DM is connected

后端 未结 8 1446
花落未央
花落未央 2021-02-02 15:13

I\'m trying to place a best guess estimate as to whether C2DM messages can be received.

I\'ve created an application that relies on pushing information to a phone while

8条回答
  •  清歌不尽
    2021-02-02 15:44

    If the device is inaccessible, even your fallback push messaging system wouldn't work. The C2DM doesn't guarantee that it will deliver your message, but the event of non-delivery would be very rare. So would be the case with any other service. The best workaround that you could have is to poll your server to check if you have any new messages that hasn't been delivered yet. I am assuming that your application is such that it's very important not to miss even a single message in 500 or may be 1000. In that case, you could implement a hybrid of push and pull.

提交回复
热议问题