Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Android: Handling received push notifications (in app's foreground/background state) #1801

Closed
@robertgreso

Description

@robertgreso

According to docs, onNotification is "Called when a remote is received or opened". I would like to ask, if its possible to somehow get the behaviour that onNotification would be on Android called once push notification is opened, not just once its received (when Android app is in foreground/background)?

When implemented on iOS, onNotification is always called just when I click on received push notification, not immediately once its received. I would like to get the same behaviour on Android as well but it behaves differently there.
On Android, if the app is in the foreground/background onNotification is called immediately once the remote notification is received, not when user actually clicks on received notification.

Is it possible to get the same behaviour as described above on iOS also for Android, ie to be able to handle received push notification on Android while the app is in foreground/background just when user opens received push notification, not just when the notification is received?

Thanks for any suggestions!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions