Mor*_*mon 5 push-notification firebase-cloud-messaging firebase-notifications angular
我很困惑应该在 Angular 14 Ionic 6 Capacitor 4 应用程序中实现哪些包,以便在应用程序用户之间发送和接收通知。我需要能够处理传入的消息:
我最初的方法是使用@capacitor/push-notifications来实现,并实现两个监听器:
pushNotificationReceived
pushNotificationActionPerformed
Run Code Online (Sandbox Code Playgroud)
然而,我发现这种方法存在以下缺点:
然后我遇到了 [firebase/messaging Service Worker][1] 方法。
我还没有实现它,但在我看来,虽然提供了onBackgroundMessage捕获和处理后台通知的方法,但还不够:
此时我有些困惑:
谢谢你![1]: https: //firebase.google.com/docs/cloud-messaging/js/receive
| 归档时间: |
|
| 查看次数: |
905 次 |
| 最近记录: |