无法使用Azure通知中心在android上发送通知

无法使用Azure通知中心在android上发送通知,android,firebase,firebase-cloud-messaging,azure-notificationhub,Android,Firebase,Firebase Cloud Messaging,Azure Notificationhub,我正在尝试使用Azure通知中心向android设备发送通知 我遵循了教程 android emulator可以注册到集线器,如屏幕截图所示,但当我尝试发送测试消息时,我收到以下错误: The Push Notification System handle for the registration is invalid 还有数到零吗???是否登记 谷歌已经更新了Firebase API,所以我更新了示例中的代码 String FCM_token = FirebaseInstanceId.get

我正在尝试使用Azure通知中心向android设备发送通知

我遵循了教程

android emulator可以注册到集线器,如屏幕截图所示,但当我尝试发送测试消息时,我收到以下错误:

The Push Notification System handle for the registration is invalid
还有数到零吗???是否登记

谷歌已经更新了Firebase API,所以我更新了示例中的代码

String FCM_token = FirebaseInstanceId.getInstance().getToken();

我不确定第二个论点应该是什么。建议应该是范围

无法找出导致此失败的原因。任何帮助都将不胜感激

谢谢

您可以尝试使用实例\u ID\u范围吗


谢谢你,萨蒂什!
String FCM_token = InstanceID.getInstance(this).getToken(NotificationSettings.SenderId, "RECEIVE");
InstanceID.getInstance(this).getToken(NotificationSettings.SenderId, GoogleCloudMessaging.INSTANCE_ID_SCOPE, null)