Skip to content

Can I get the data for a notification received while my Android App is in the Background? #503

Closed Answered by robingenz
danielzen asked this question in Q&A
Discussion options

You must be logged in to vote

According to the documentation of the addListener('notificationReceived', ...) method:

On Android, this listener is called for every push notification if the app is in the foreground. If the app is in the background, then this listener is only called on data push notifications. See https://firebase.google.com/docs/cloud-messaging/android/receive#handling_messages for more information.

So yes, you can receive notifications in the background. Make sure that you send a data push notification.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@danielzen
Comment options

Answer selected by danielzen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants