我正在构建一个类似于Swiggy的应用程序,因此当从客户那里获得新订单时,我会触发一个推送通知,此时我需要触发一个不同的喇叭声音。 使用的模块: // For Firebase notification
@react-native-firebase/messaging
react-native-push-notification (for local notification)
// Background lisner to trigger sound
import messaging from '@react-native-firebase/messaging';
im
在中,我无法让setBackgroundMessageHandler在我的应用程序中工作。通知接收得很好,但没有执行处理程序。
我已经像在那样做了,但没有结果。
import { AppRegistry } from 'react-native';
import messaging from '@react-native-firebase/messaging';
import AsyncStorage from '@react-native-community/async-storage';
import App from './App&
used library versions
==================
"@react-native-firebase/app":"8.4.6","@react-native-firebase/messaging":"8.0.0","react":"16.8.3","react-native":"0.63.3",
我流动文档并将我的应用程序迁移到版本6,但我收到以下错误
TypeError: _app.default.messaging.notifications is not a function.
(In '_app.default.messaging.notifications()', '_app.default.messaging.notifications' is undefined)
这是我的代码,如果我做了其他事情,我会把所有的东西都保持原样
.
.
import firebase from '@react-native-firebase/app&
我将我的应用程序升级为react-原生0.61.2,所以我不得不将react-原生--firebase升级到6.0.3,我从添加@react-native-firebase/app和@react-native-firebase/messaging包开始。
import { Platform } from 'react-native'
import { firebase } from '@react-native-firebase/messaging'
// pluck values from your `GoogleService-Info.plist` yo
我遵循了iOS来自的说明,但是编译显示了这些错误。我猜这是某种版本不兼容,但我相信我是最新版本的react-native-firebase。当我构建应用程序时,会出现以下错误:
❌ /Users/matt/Desktop/myapp/node_modules/react-native-firebase/ios/RNFirebase/messaging/RNFirebaseMessaging.m:91:51: expected a type
- (void)applicationReceivedRemoteMessage:(nonnull FIRMessagingRemoteMessage
无法在我的React本机项目中解决此错误,该项目使用Firebase Cloud消息传递模块@react本机-火基/消息传递:
BUILD FAILED in 9s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServ