我正在使用gcm gem从rails app发送android推送通知。我从rails控制台获取的错误是
{:主体=>" {\" multicast_id \":5375003398127853487,\"成功\":0,\"失效\& #34;:1,\" canonical_ids \":0,\"结果\":[{\"错误\":\&#34 ; MismatchSenderId \"}]}&#34 ;, :标题=> {"内容类型" = GT; ["应用/ JSON;字符集= UTF-8&#34], " date" => ["星期一,2016年3月7日12:47:23 GMT"],"到期" => [" Mon, 3月7日 2016年12:47:23 GMT"],"缓存控制" => ["私人,max-age = 0"], " X-内容类型选项" = GT; [" nosniff&#34], " x-frame-options" => [" SAMEORIGIN"]," x-xss-protection" => [" 1; mode = block"]," server" => [" GSE"], " alternate-protocol" => [" 443:quic,p = 1"]," alt-svc" => [" quic = \":443 \&#34 ;; MA = 2592000; v = \" 30,29,28,27,26,25 \""],"接受范围" => ["无&#34 ], "变化" => ["接受编码"],"连接" => ["关闭"]}, :status_code => 200,:response =>"成功",:canonical_ids => [], :not_registered_ids => []}
请帮我弄明白
答案 0 :(得分:2)
确保满足以下条件:
/app
目录onMessageReceived
方法,以便创建并显示通知。Google提供的示例项目实际上提供了通知正常工作的最低设置要求。 Refer Here