You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inside my backgroundMessaging function I have this code:
constbackgroundMessaging=async(message)=>{// handle your messageconsole.log(message);constlog={logMessage: 'this is the event emitter log'}invokeApp({data: log});returnPromise.resolve();}exportdefaultbackgroundMessaging;
When the app is in the background the above function logs the message, but invokeApp does not seem to be called because the DeviceEventEmitter does not log anything:
hi
if you are using react native firebase v >6, as they say:
This method must be called outside of your application lifecycle, e.g. alongside your AppRegistry.registerComponent() method call at the the entry point of your application code.
setBackgroundMessageHandler
i use it and it work's fine
but the the app open's and NativeEventEmitter is not working
PS : DeviceEventEmitter is deprecated as in stackoverflow Question
if you have another idea please share it
I am receiving data only Firebase Cloud Messages when my Android React Native app is in the background or is killed. Here is my headless task:
Inside my backgroundMessaging function I have this code:
When the app is in the background the above function logs the
message
, butinvokeApp
does not seem to be called because theDeviceEventEmitter
does not log anything:However, when the app is killed (not in background), once I open the app the
DeviceEventEmitter
function logs thelogMessage
.At no point does the app come to the foreground.
The text was updated successfully, but these errors were encountered: