Skip to content
Discussion options

You must be logged in to vote

Hi @Nut41tank , and sorry for the late reply.

From what you're describing, the warning:

[notifee] no background event handler has been set. Set a handler via the "onBackgroundEvent" method.

means that NotifyKit is receiving an event while the app is in a background state, but no onBackgroundEvent() handler is registered at that moment.

The background handler should be registered at the top level of your app entry point, for example in index.js, outside of any React component and ideally before AppRegistry.registerComponent(...):

import { AppRegistry } from 'react-native';
import notifee, { EventType } from 'react-native-notify-kit';

notifee.onBackgroundEvent(async ({ type, detail }) => {
  

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by marcocrupi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants