首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >安卓(c2dm)推送通知错误

安卓(c2dm)推送通知错误
EN

Stack Overflow用户
提问于 2011-06-07 12:31:34
回答 1查看 927关注 0票数 1

我正在使用C2DM-Sharp库为android创建一个推送通知服务器。我已经创建了一个测试推送通知的示例代码,但是当iam关闭连接时,代码会出现一个错误“一个或多个错误发生”。“一个任务被取消了”下面是我的代码

C2dmService服务;

代码语言:javascript
运行
复制
        //Service emailid 
        var senderID = "myservice@gmail.com"; 
        var password = "myservice Password";
        //The application that is registering to receive messages
        var applicationID = "appID";

        service = new C2dmService(senderID, password, applicationID);

        service.Start();
        NameValueCollection extras;
        //for (int i = 0; i < 3; i++)
        //{
            extras = new NameValueCollection();
            //
            string registrationId = textBox4.Text;
            //An ID issued by the C2DM servers to the Android application that allows it to receive messages
            string collapseKey = "CKEY";
            string key = "count";
            string value = "5";
            extras.Add(key, value);

           //Queue up the message to be sent
            service.QueueMessage(registrationId, extras, collapseKey);
        //}
            service.Stop();------- its giving error here at the time of stoping the service
EN

回答 1

Stack Overflow用户

发布于 2011-06-07 13:02:58

我已经给出了所有认为与android中的C2DM服务相关的答案,请显示给定的链接。

C2DM permission.C2D_MESSAGE gives Installation error

c2dm : how to receive the message in the device? (using PHP)

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6265172

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档