Background information:
- SDK Version: 42.0.1
- Platforms(Android/iOS/web/all): Android & iOS
- expo-notifications version: 0.13.3
I want to have my notification displayed in the foreground when the app is running. I follow every bit of the code in the document: Notifications - Expo Documentation
The following code is added to my project. After adding these codes, the Android notification appears successfully in the foreground. However, there is no effect when I send notifications to iOS devices. Notifications in the background work fine for both iOS and Android.
Notifications.setNotificationHandler({
handleNotification: async () => ({
shouldShowAlert: true,
shouldPlaySound: false,
shouldSetBadge: false,
}),
});
When I test the example code in the document on snack, the notification does not appear in the foreground either: Push Notifications - Snack