Ways to guess if C2DM is connected

后端 未结 8 1454
花落未央
花落未央 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:35

    This may be a bit naive as I am not an active C2DM user, but wouldn't it be possible to read

    /proc/net/netstat

    and see if there are any active TCP connections. If there aren't any, then C2DM can't possibly be working. You could also make this technique more versatile by forming a C2DM whitelist that you would expect to find (or maybe its possible to filter on a special C2DM port?)

提交回复
热议问题