BACKGROUND_NOTIFICATION_TASK dosen't work

SDK Version: 44.0.0
Platforms(Android/iOS/web/all): Android
BACKGROUND_NOTIFICATION_TASK

Hello, I’m using a background notification task as the documentation:

import * as TaskManager from 'expo-task-manager';
import * as Notifications from 'expo-notifications';

const BACKGROUND_NOTIFICATION_TASK = 'BACKGROUND-NOTIFICATION-TASK';

TaskManager.defineTask(BACKGROUND_NOTIFICATION_TASK, ({ data, error, executionInfo }) => {
  console.log('Received a notification in the background!');
  // Do something with the notification data
});

Notifications.registerTaskAsync(BACKGROUND_NOTIFICATION_TASK);

I’m using expo go, in the documentation says that “is not supported in Expo Go”, so i build it for android but it is not working, when receiving a notification nothing happens.

Same happening here, this snippet code posted by @juanra96 does not get executed on Android.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.