新senderID上不GCM mismatchedSenderID工作 [英] New senderID does not work on GCM mismatchedSenderID

查看:244
本文介绍了新senderID上不GCM mismatchedSenderID工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几个月前,我从激活谷歌API控制台我GCM,在我的Andr​​oid项目实施它和所有的工作只是罚款。我能注册,获得REGID和使用我的服务器API密钥从我的服务器发送通知。所有工作的罚款。

昨天,我创建了一个新senderID与我的其他Gmail帐户,但是当我替换成新的信息,Sender ID和服务器API密钥,谷歌回复恼人的 mismatchedSenderID 错误信息和GCM将不被发送<!/ p>

闲来无事项目已经改变,只是一个新的senderID!可能是什么问题?


解决方案

好吧,如果你开始使用新的API密钥发送通知,对于老senderID生成的所有注册ID将停止工作。你应该清楚你的数据库,并开始从用户收集新注册的ID(基于新senderID)。


  

不匹配的发件人


  
  

一个注册ID被绑定到某一组发件人。当一个应用程序使用GCM注册时,必须指定发件人被允许发送消息。确保您尝试发送邮件到该设备在使用其中的一个。如果切换到不同的发送者,现有注册ID将无法工作。当错误code是MismatchSenderId发生。


A few months ago I activated my GCM from Google API console and implemented it in my Android project and all worked just fine. I was able to register, get the regId and send notifications from my server using my Server API key. All worked fine.

Yesterday I created a new senderID with my other gmail account, but when I replaced the senderID and server API key with the new information, Google replies the annoying mismatchedSenderID error message and the GCM won't be sent!

Nothing else has changed in the project, just a new senderID! What could be the problem?

解决方案

Well, if you started sending notifications with the new API Key, all the Registration IDs that were generated for the old senderID will stop working. You should clear your database and start collecting new Registration IDs (based on the new senderID) from your users.

Mismatched Sender

A registration ID is tied to a certain group of senders. When an application registers for GCM usage, it must specify which senders are allowed to send messages. Make sure you're using one of those when trying to send messages to the device. If you switch to a different sender, the existing registration IDs won't work. Happens when error code is MismatchSenderId.

这篇关于新senderID上不GCM mismatchedSenderID工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆