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
{{ message }}
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.
I have set up the project for both ios and android. onNotificationOpened and onNotificationReceived works fine for android, but nothing happens if the app is in background. For ios, on_notification gets triggered in background if the background processing flag is turned on for a message in Urban Airship. Am I missing something?
The text was updated successfully, but these errors were encountered:
I did some digging around and looks like Line 24 of ReactNativeUAReceiver.java is always returning false when the app is in background, an hence ReactNativeUAEventEmitter's sendEvent is not getting triggered.
If I comment out the isRunning check on line 26,
if (ReactNativeUAEventEmitter.getInstance() != null) // instead of if (isRunning && ReactNativeUAEventEmitter.getInstance() != null)
My on_notification code on the js side gets executed fine whether the app is in background or foreground.
@itsrifat It looks like react only gets setup from an activity. Thats not always going to happen when an Android application is woken up in the background, so the react context will not be setup. This seems to be a limitation with react and not this plugin.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have set up the project for both ios and android.
onNotificationOpened
andonNotificationReceived
works fine for android, but nothing happens if the app is in background. For ios,on_notification
gets triggered in background if the background processing flag is turned on for a message in Urban Airship. Am I missing something?The text was updated successfully, but these errors were encountered: