Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

PRESS event is not detected in onBackgroundEvent #1105

Description

@tamirla

I'm using notifee to send local notification from inside the app and want to be able to detect that user pressed on notification.

I thought I will be able to check for PRESS event type inside onBackgroundEvent, however I noticed that onBackgroundEvent is triggered only once with DELIVERED event type, then the app is opened, and only then I can detect PRESS event type inside onForegroundEvent that is triggered once the app is opened.

my questions are -

  • Is this the expected behaviour ?
  • shouldn't onBackgroundEvent be able to use also to detect PRESS event ?
  • Is it possible that onBackgroundEvent will be triggered multiple times, first with DELIVERED, then with PRESS ?
  • If not, how else it can detect PRESS if it was already triggered with DELIVERED ?

I found the following "hint" that implies I should use onForegroundEvent but I didn't really understand why...

I'm using only notifee without Firebase, most examples & issues I saw involve also Firebase.

In iOS I at least get both onBackgroundEvent & onForegroundEvent triggered, in Android I'm seeing only onBackgroundEvent triggered once with DELIVERED and don't see onForegroundEvent triggered at all.

I thought this could be related to this issue, however I'm using RN < 0.73:

"react-native": "0.72.10"
"@notifee/react-native": "^7.8.2",

Just to clarify - I want to detect when user pressed on notification itself, I don't have any buttons on the notification.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions