Sye*_*san 1 android firebase react-native-firebase
我已成功将Firebase集成到我的移动应用程序中。目前,我正在android上对其进行测试。我已成功收到通知。我的下一步是在应用程序处于前台和后台时触发事件并读取数据。为此,我看了文档并使用了firebase.notifications().displayNotification()。但这会引发错误。
确保您具有:
1)在“ android / app / build.gradle”文件中安装了必需的Firebase Android SDK依赖项“ com.google.firebase:firebase-notifications”。
2)在您的“ MainApplication.java”文件中导入了“ io.invertase.firebase.notifications.RNFirebaseNotificationsPackage”模块。3)在RN'getPackages()'方法列表内添加了'new RNFirebaseNotificationsPackage()'行。
| 归档时间: |
|
| 查看次数: |
3218 次 |
| 最近记录: |