簡體   English   中英

@react-native-firebase/messaging 如何自定義通知?

[英]@react-native-firebase/messaging how to customize notification?

根據文檔: https://rnfirebase.io/messaging/usage我想顯示來自 firebase 的背景通知,但具有自定義配置,如自定義圖標、自定義數據和自定義 ZC1C425268E68385D1ABZA94 上的點擊通知。

// index.js
import { AppRegistry } from 'react-native';
import messaging from '@react-native-firebase/messaging';
import App from './App';

// Register background handler
messaging().setBackgroundMessageHandler(async remoteMessage => {
  console.log('Message handled in the background!', remoteMessage);
});

AppRegistry.registerComponent('app', () => App);

如何定制這個?

https://github.com/invertase/react-native-firebase/issues/3826#issuecomment-648903659

根據此聲明並參考文檔,react native firebase 版本 6+ 消息傳遞僅支持雲集成和簡單的通知顯示。

如果在顯示通知時需要額外配置,則應使用任何其他本地通知庫,例如“Notifee”

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM