Jac*_*nkr 1 android google-cloud-messaging
奇怪的是,通知之前有效.所以我不确定发生了什么.我尝试将我的应用重新安装到设备上,但没有任何改变.
{"multicast_id":xxxxxxxxxxxxxxxxxxx,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"MismatchSenderId"}]}
Run Code Online (Sandbox Code Playgroud)
因为这在某一点上有效,我知道我正在使用正确的密钥.我甚至根据我遇到的其他SOF线程进行了三重检查.现在可能出现什么问题?我现在环顾了几天,我还是不知所措.
**编辑**
这是从我的服务器发送消息时的POST信息.
头
Array
(
[0] => Authorization: key=xxxxxxx-key-for-browser-apps-from-google-apis-console-xxxxxxx
[1] => Content-Type: application/json
)
Run Code Online (Sandbox Code Playgroud)
字段
Array
(
[registration_ids] => Array
(
[0] => xxxxxxxxx-big-old-id-from-the-device-xxxxxxxx
[data] => Array
(
[message] => hello
)
)
Run Code Online (Sandbox Code Playgroud)
我正在使用与之关联的密钥Key for browser apps (with referers).
Jac*_*nkr 10
显然,当您重新编译应用程序时,它有时会将设备ID生成丢弃到与先前ID不匹配的位置.
我要做的是在手机上完全卸载应用程序并再次重新编译应用程序(通过eclipse).这看起来很可悲,但它最接近我目前可行的解决方案.