问题描述
自方法以来,我想问一下如何在react natibe firebase v6中创建频道
const channel = new firebase.notifications.Android.Channel(
'local','local notification',firebase.notifications.Android.Importance.Max,);
不能用于v6。
解决方法
您可以按照this教程将推送通知添加到Android Apps。
要创建一个通知频道,我将以下两行添加到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"/>
就像教程本身所说的那样