Azure使用FCM向Android发送测试消息-从令牌提供者获得的令牌中的结果错误 [英] Azure Send Test Message To Android with FCM - Results in The Token obtained from the token provider is wrong

查看:86
本文介绍了Azure使用FCM向Android发送测试消息-从令牌提供者获得的令牌中的结果错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已在Azure中配置了一个通知中心,以将消息发送到Apple和Android设备.

I have configured a notification hub in Azure to send messages to Apple and Android devices.

在门户或VS.NET中发送测试消息时,Apple消息可以顺利通过,而Android消息返回错误消息:

When sending test messages in the portal or VS.NET, the Apple messages go through with no problem, while the Android messages return an error message:

The Token obtained from the Token from token provider is wrong.

我再次检查了API密钥,以确保在Azure通知中心中配置的API密钥是Firebase控制台中云消息"选项卡下的正确服务器密钥.

I double checked the API key to make sure that the one configured in the Azure notification hub is the correct server key from the Firebase Console under the Cloud Messaging tab.

我看到目标设备是使用服务器资源管理器注册的.不知道有什么问题.我删除了Firebase应用并重新创建,但并没有帮助.

I see the target device is registered using the server explorer. Not sure what could be wrong. I deleted the Firebase app and recreated it, but it did not help.

不确定下一步要去哪里.谢谢.

Not sure where to look next. Thanks.

推荐答案

最后弄清楚,PushNotification插件需要Firebase仪表板中的projectID/sender ID(全#),而不是Firebase仪表板中的app ID(唯一名称).播放商店清单.

Finally figured out that the PushNotification plugin needed the projectID/sender id (all #'s) from the Firebase dashboard not the app id (unique name) from the Play store listing .

现在正在接收推送通知

这篇关于Azure使用FCM向Android发送测试消息-从令牌提供者获得的令牌中的结果错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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