如何在Android中运行C2DM示例程序?
嗨,我对安卓很陌生。我想用 C2DM 在 android 中开发一个应用程序。我有来自以下站点的 C2DM 示例代码 http: //www.ipragmatech.com/power-mobile-app-android-push-notification-c2dm.html 。我执行了以下步骤设备->设置->帐户和同步->谷歌帐户->添加账户->登录->给了我的帐户名和密码。然后我运行了我的代码,但它显示了一些内容
09-30 15:28:22.868: WARN/C2DMReceiver-onRegistered(491): Sending request to Server
09-30 15:36:52.888: ERROR/C2DMReceiver-onRegistered(614): Connect to /192.168.1.4:8080 timed out
09-30 15:36:52.888: WARN/C2DMReceiver-onRegistered(614): APA91bGI7fsthXytTrOMWxcldx5haV21e4b98XqLV2C4cnCrq0betXuUa2vrklD0w_Qn6LuzNFDQqqkegfKe1-UL5W8Gce9IXrHjEmBajeAN2lcW7LnTyY0
09-30 15:37:20.008: DEBUG/SntpClient(71): request time failed: java.net.SocketException: Address family not supported by protocol
09-30 15:42:20.059: DEBUG/SntpClient(71): request time failed: java.net.SocketException: Address family not support by protocol
然后它不 支持作品。有人告诉我从 c2dm 服务器获取注册 ID 的过程吗?
Hi I am very new to android. I would like to develop an application in android with C2DM. I have a sample code for C2DM from the following site http://www.ipragmatech.com/power-mobile-app-android-push-notification-c2dm.html . I did the following steps device-> settings-> account & sync -> google account-> add account-> sign in-> gave my account name and password. And then I ran my code ,but its shows some thing
09-30 15:28:22.868: WARN/C2DMReceiver-onRegistered(491): Sending request to Server
09-30 15:36:52.888: ERROR/C2DMReceiver-onRegistered(614): Connect to /192.168.1.4:8080 timed out
09-30 15:36:52.888: WARN/C2DMReceiver-onRegistered(614): APA91bGI7fsthXytTrOMWxcldx5haV21e4b98XqLV2C4cnCrq0betXuUa2vrklD0w_Qn6LuzNFDQqqkegfKe1-UL5W8Gce9IXrHjEmBajeAN2lcW7LnTyY0
09-30 15:37:20.008: DEBUG/SntpClient(71): request time failed: java.net.SocketException: Address family not supported by protocol
09-30 15:42:20.059: DEBUG/SntpClient(71): request time failed: java.net.SocketException: Address family not supported by protocol
And then it doesn't works. Anybody tell me the procedure for get the registration ID from c2dm server?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个 doc 和 这个。
Try this doc and this.