I tried adding push notification with the expo, I am able to push notification from the server but even though the app is in foreground notification handler is not triggered, I have replicated the documentation example from expo-notifications
export default function App(props) {
const [expoPushToken, setExpoPushToken] = useState('');
const [notification, setNotification] = useState(false);
const notificationListener = useRef();
const responseListener = useRef();
useEffect(() => {
registerForPushNotificationsAsync().then(token => setExpoPushToken(token));
notificationListener.current = Notifications.addNotificationReceivedListener(notification => {
setNotification(notification);
});
responseListener.current = Notifications.addNotificationResponseReceivedListener(response => {
console.log(respone)
});
}, []);