【问题标题】:System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary while sending Push Notifiaction from PUSHSHARPSystem.Collections.Generic.KeyNotFoundException:从 PUSHSHARP 发送推送通知时,字典中不存在给定的键
【发布时间】:2016-03-08 12:23:44
【问题描述】:

从服务器向 gcm 发送通知时出现异常。 因为 APNS 通知工作正常。

apps["com.app.myAPP"].Gcm.QueueNotification(new GcmNotification
        {

            RegistrationIds = new List<string> {
         deviceId

        },
            Data = JObject.Parse(msg),


        });

在哪里

msg = "{ \"Somekey\" : \"somevalue\" }";

如果有人帮助我解决此问题,将非常感谢您。

【问题讨论】:

  • "com.app.myAPP" 可能不是您的应用程序集合
  • 是的,你是对的 .. 非常感谢 :)

标签: c# json push-notification google-cloud-messaging pushsharp


【解决方案1】:

发现问题

我没有使用正确的应用名称 apps["com.app.myApp"]。

谢谢

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-06-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多