use silent and local Notification with Expo

Hello , I am working with expo notification , I would like to use local notification and silent notification

  1. SDK Version: 39.0.0
  2. Platforms : Android/iOS

I am using setNotificationHandler to handle the silent notification
Notifications.setNotificationHandler({
handleSuccess: (notificationId) => console.log(“Notif success”, notificationId),
handleError: (notificationId, error) => console.log(“Notif error”, notificationId, error),
handleNotification: async () => ({
shouldShowAlert: false,
shouldPlaySound: false,
shouldSetBadge: false,
}),
});

But how can i make shouldShowAlert : true if the notification is local

Thanks for helping me

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