如何在Android中运行C2DM示例程序?

发布于 2024-12-07 09:24:16 字数 1049 浏览 0 评论 0原文

嗨,我对安卓很陌生。我想用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

囍孤女 2024-12-14 09:24:16

试试这个 doc这个

Try this doc and this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文