[英]Firebase Messaging Difference between callbacks
I'm having a hard time finding any site that clearly explains the differences between the firebase messaging callbacks of onBackgroundMessage, onLaunch, and onResume.我很难找到任何可以清楚地解释 onBackgroundMessage、onLaunch 和 onResume 的 firebase 消息回调之间差异的站点。 These words may seem common sense but they are not.
这些话似乎是常识,但事实并非如此。 I need a clear explanation of the differences between these callbacks.
我需要清楚地解释这些回调之间的差异。 In what situations are these callbacks used?
在什么情况下使用这些回调?
As far as I know, Firebase Cloud Messaging is not only used for sending Notifications.据我所知,Firebase 云消息不仅用于发送通知。
With FCM, you can send two types of messages to clients:使用 FCM,您可以向客户端发送两种类型的消息:
Notification messages sometimes thought of as "display messages."通知消息有时被认为是“显示消息”。 These are handled by the FCM SDK automatically.
这些由 FCM SDK 自动处理。
Data messages , which are handled by the client app.数据消息,由客户端应用程序处理。
This Official Documentation explains it all.这个官方文档解释了这一切。
Functions Reference: https://pub.dev/packages/firebase_messaging#receiving-messages函数参考: https://pub.dev/packages/firebase_messaging#receiving-messages
Message Types Reference: https://firebase.google.com/docs/cloud-messaging/concept-options#notifications_and_data_messages消息类型参考: https://firebase.google.com/docs/cloud-messaging/concept-options#notifications_and_data_messages
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.