Please provide the following:
- SDK Version: 38.0.0
- Platforms(Android/iOS/web/all): Android ( I am using Physical device )
Steps:
- I have installed Notifications using the following command:
expo install expo-notifications
- After that I have imported the expo-notification, set the notification handler and schedule the notification as follows:
import * as Notifications from "expo-notifications";
Notifications.setNotificationHandler({
handleNotification: async () => ({
shouldShowAlert: true,
shouldPlaySound: true,
shouldSetBadge: false,
}),
});
Notifications.scheduleNotificationAsync({
content: {
title: "Time's up!",
body: "Change sides!",
},
trigger: {
seconds: 30,
},
});
Issue:
This works if the application is in the foreground. How can I achieve same behavior when the expo client is closed? I am not getting any notification when the expo client is closed.