【问题标题】:React Native Firebase v6 push notificationReact Native Firebase v6 推送通知
【发布时间】:2020-08-12 12:35:32
【问题描述】:

我想问一下如何在react natibe firebase v6中创建通道,因为方法

const channel = new firebase.notifications.Android.Channel(
      'local',
      'local notification',
      firebase.notifications.Android.Importance.Max,
    );

不能用于 v6。

【问题讨论】:

    标签: firebase react-native react-native-firebase


    【解决方案1】:

    您可以按照this 教程将推送通知添加到 Android 应用程序。

    要创建通知通道,我将以下 2 行添加到 android/app/src/main/AndroidManifest.xml

    <meta-data  android:name="com.dieam.reactnativepushnotification.notification_channel_name"  
    android:value="YOUR NOTIFICATION CHANNEL NAME"/>
    
    <meta-data  android:name="com.dieam.reactnativepushnotification.notification_channel_description" 
    android:value="YOUR NOTIFICATION CHANNEL DESCRIPTION"/>
    

    就像教程本身所说的那样

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-10
      • 2020-11-03
      • 2015-06-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多