且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

单击通知后如何访问通知数据(firebase云消息传递)

更新时间:2023-02-26 21:13:45

Cloud Messaging仅用于从手机上的服务器发送消息.

Cloud Messaging is only used to send messages from a server on the phone.

之前,在Firebase 5上,我们有一个名为通知"的程序包,通过该程序包,我们可以在单击数据时管理数据的拦截.

Before, on firebase 5, we had a package called "notifications" which allowed us to manage the interception of data when you clicked on it.

自Firebase 6起,此软件包已不存在(嗯,以某种方式它将成为付费服务,并且该服务称为Notifee,但仍在测试中).

Since Firebase 6, this package doesn't exist anymore (well, in a way it will become paying and this service is called Notifee but it is still in test).

您必须使用外部程序包(例如react-native-push-notifications),使您可以拦截推送通知数据.

You have to use external packages such as react-native-push-notifications which allows you to intercept push notifications data.