Im trying to test when notification is received while the app is backgrounded, following this documentation
const BACKGROUND_NOTIFICATION_TASK = 'BACKGROUND-NOTIFICATION-TASK';
TaskManager.defineTask(BACKGROUND_NOTIFICATION_TASK, ({ data, error, executionInfo }) => {
console.log('Received a notification in the background!');
});
Notifications.registerTaskAsync(BACKGROUND_NOTIFICATION_TASK);
And I doesn’t work !!!