使用 IONIC 3 使用 Azure 通知中心 [英] Working with Azure notification hub using IONIC 3

查看:33
本文介绍了使用 IONIC 3 使用 Azure 通知中心的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前正在使用 azure 通知中心,它允许我们使用 APN 和 GCM/FCM.推送通知功能适用于我们当前的原生应用(Android 和 iOS).

We are currently using azure notification hub which allows us to work with both APN and GCM/FCM. Push notification functionality works properly with our current native apps (both android and iOS).

现在我们正在使用 IONIC 3 开发新应用程序,并尝试在其中实现推送通知.我们看过很多文章.其中一些正在使用 ionic 1 或 ionic 2.很少有人使用 IONIC 3 不支持的已弃用包.

Now we are developing new apps using IONIC 3 and now trying to implement push notification in the same. There are many articles we have gone through. Some of them are using either ionic 1 or ionic 2. Few are using deprecated packages which are not supported on IONIC 3.

后端开发人员使用了通知中心作为设备注册中心点的变体.设备直接在通知中心注册,而不是通过我们的后端.我们尝试实现的第一件事是在设备上安装应用程序并首次运行时向通知中心注册我们的设备.我们没有找到方法来做到这一点.我们尝试使用几个可用的软件包,但没有奏效.我们已经在 firebase 中创建了项目.官方网站有 tutorial 用于除 ionic/cordova 之外的所有应用程序.任何建议都将有助于实施它.

Backend developers have used the variant where the notification hub is the central point for device registrations. Devices are registered with the notification hub directly, rather than through our back-end. The first thing we are trying to achieve is registering our devices with notification hub when app is installed on device and running it for the first time. We are not finding a way to do it. We tried using couple of packages available but it did not work. We already have created project in firebase. Offical website has tutorial for all applications excpet ionic/cordova. Any suggestions will be helpful for implementing it.

推荐答案

我在 Azure 通知中心示例 存储库.它使用第三方 Cordova 插件来管理注册.该插件处于活动状态,我已经做出了一些贡献,并且被插件作者接受.

I created an Ionic 3 sample in the Azure Notification Hubs Samples repository a few months ago. It uses a third-party Cordova plugin to manage registration. The plugin is active, I've made a couple of contributions and they were accepted by the plugin author.

我正在研究 Ionic 4 示例,我将在同一个 repo 中发布它,但 Capacitor 的 Cordova 插件有问题,我没有花足够的时间来解决这个问题.我会尽快这样做.

I'm working on an Ionic 4 sample, which I'll publish in the same repo, but Capacitor has a problem with the Cordova plugin and I've not spent enough time trying to figure it out. I'll try to do so soon.

这篇关于使用 IONIC 3 使用 Azure 通知中心的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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