【问题标题】:Using Azure Notification Hub with Baidu to send notification to Xamarin Android app通过百度使用 Azure Notification Hub 向 Xamarin Android 应用发送通知
【发布时间】:2020-01-08 04:09:47
【问题描述】:

我开发了一个 Xamarin Android 应用程序,它成功地做了以下事情

  1. 可以注册百度推送
  2. 可以接收百度推送的通知
  3. 可以注册 Azure 通知中心(我可以在 Azure 通知中心仪表板中看到注册记录,但我看不到这些计数背后的详细信息)

但是,在通知中心使用“测试发送”功能进行测试时,我的应用将无法接收通知。

我确认我在 Notification Hub > 百度设置中输入了正确的 Api Key 和 Secret Key。

所以我被困在这一点上。有人有这方面的经验吗?感谢任何支持/评论/分享。谢谢!

附:我只能看到注册数量在增加,但我无法确保我的设备注册在百度下。 Azure Notification Hub 如何能够区分我的注册令牌与百度有关?注册码如下几行

// 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}");

【问题讨论】:

    标签: push-notification xamarin.android azure-notificationhub baidu


    【解决方案1】:

    对不起,我弄错了,我应该使用以下功能进行百度注册。希望它可以帮助像我这样的新手:o)

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

    【讨论】:

      猜你喜欢
      • 2020-05-25
      • 2021-02-11
      • 1970-01-01
      • 2020-11-18
      • 2021-09-04
      • 1970-01-01
      • 1970-01-01
      • 2019-06-10
      • 1970-01-01
      相关资源
      最近更新 更多