简体   繁体   English

如何在 Flutter 中将 Pusher 与 Awesome Notifications 包一起使用

[英]How can I use Pusher together with Awesome Notifications package in Flutter

I was trying to implement notifications in my flutter app.我试图在我的颤振应用程序中实现通知。 I tried to use the package pusher ( https://pub.dev/packages/flutter_pusher ) where I wouldn't have any problems to use Pusher for my notification.我尝试使用包推送器( https://pub.dev/packages/flutter_pusher ),在这种情况下,使用 Pusher 进行通知不会有任何问题。 Unfortunately, this package was breaking too many thing and I decided to go with awesome_notifications package( https://pub.dev/packages/awesome_notifications ).不幸的是,这个包破坏了太多东西,我决定使用 awesome_notifications 包( https://pub.dev/packages/awesome_notifications )。

Now everything works fine, but I have no idea how to connect Pusher using Awesome Notification package or any other package.现在一切正常,但我不知道如何使用 Awesome Notification 包或任何其他包连接 Pusher。

Does anybody know how to solve my issue?有人知道如何解决我的问题吗?

To use awesome notifications along with Pusher Beams you would need to implement your own code to:要与 Pusher Beams 一起使用很棒的通知,您需要实现自己的代码以:

-register the device with Beams (using the API, documented at https://pusher.com/docs/beams/reference/device-api/ ) - 使用 Beams 注册设备(使用 API,记录在https://pusher.com/docs/beams/reference/device-api/

-Associate a user ID, or subscribe to an interest (API endpoints for this also available in the above link) - 关联用户 ID,或订阅兴趣(上述链接中也提供了用于此的 API 端点)

-detect the receipt of a notification and then invoke Awesome Notifications to display the message. - 检测到通知的接收,然后调用 Awesome Notifications 来显示消息。 Beams uses the normal platform publish gateways, such as FCM and APNS, so Awesome Notifications should be able to handle this. Beams 使用普通平台发布网关,例如 FCM 和 APNS,因此 Awesome Notifications 应该能够处理此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM