-
I can see a push notification when my app is on background or quit state, but I can't get console output. Handling background state messages like that (index.js):
How should I debug it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Please provide versions in use, and the exact JSON sent from the firebase admin sdk (minus device tokens or API tokens of course), plus a full App.js to reproduce You don't even mention what operating system you are using 😅 - how would you answer this question if a colleague came to you, asking it? As a guess though, you have not set the handler prior to registering the app root component? |
Beta Was this translation helpful? Give feedback.
-
If you include notification payload on iOS, when you are not in the foreground, you asking the SDKs to handle the JSON when it comes in. You won't get control (in the handler) until the user interacts with the notification Looks correct but if you want the background/quit state stuff you need to go data only I think |
Beta Was this translation helpful? Give feedback.
If you include notification payload on iOS, when you are not in the foreground, you asking the SDKs to handle the JSON when it comes in. You won't get control (in the handler) until the user interacts with the notification
https://github.com/aevaldas/RNFirebaseTestEA/blob/9482735df19da5305473e4afa14d92b6369540ed/index.js#L10-L12
Looks correct but if you want the background/quit state stuff you need to go data only I think