Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Push notification 与百度一起使用Azure通知中心向Xamarin Android应用程序发送通知_Push Notification_Xamarin.android_Azure Notificationhub_Baidu - Fatal编程技术网

Push notification 与百度一起使用Azure通知中心向Xamarin Android应用程序发送通知

Push notification 与百度一起使用Azure通知中心向Xamarin Android应用程序发送通知,push-notification,xamarin.android,azure-notificationhub,baidu,Push Notification,Xamarin.android,Azure Notificationhub,Baidu,我已经开发了一个Xamarin Android应用程序,它成功地完成了以下任务 可以注册百度推送 可以接收来自百度推送的通知 可以向Azure Notification Hub注册(我可以在Azure Notification Hub仪表板中查看注册记录,但我无法查看这些计数背后的详细信息) 但是,当在通知中心使用“测试发送”功能进行测试时,我的应用程序将无法接收通知 我确认已将正确的Api密钥和密钥放入Notification Hub>Baidu设置中 所以我在这一点上陷入了困境。有人有过这方

我已经开发了一个Xamarin Android应用程序,它成功地完成了以下任务

  • 可以注册百度推送
  • 可以接收来自百度推送的通知
  • 可以向Azure Notification Hub注册(我可以在Azure Notification Hub仪表板中查看注册记录,但我无法查看这些计数背后的详细信息)
  • 但是,当在通知中心使用“测试发送”功能进行测试时,我的应用程序将无法接收通知

    我确认已将正确的Api密钥和密钥放入Notification Hub>Baidu设置中

    所以我在这一点上陷入了困境。有人有过这方面的经验吗?感谢您的支持/评论/分享。谢谢

    另外,我只能看到注册数量在增加,但我无法确保我的设备注册在百度下。Azure通知中心如何能够区分我的注册令牌与百度相关?注册码仅为以下几行

    // Register with Notification Hubs
    hub = new NotificationHub("Notification_Hub", "MY_HUB_CONNECTION_STRING", context);
    var tags = new List<string>() { };
    var regID = hub.Register(token, tags.ToArray()).RegistrationId;
    Console.WriteLine($"Successful registration of ID {regID}");
    
    //向通知中心注册
    hub=新通知中心(“通知中心”、“我的中心连接字符串”、上下文);
    var tags=newlist(){};
    var regID=hub.Register(token,tags.ToArray()).RegistrationId;
    WriteLine($“成功注册ID{regID}”);
    
    对不起,我犯了一个错误,我应该使用以下功能进行百度注册。希望它能帮助像我这样的新手:o)

    var regID = hub.RegisterBaidu(userId, channelId, someTags);