```js
const myNotificationReceivedHandler = (notification) => {
  // Respond to the received push notification message in realtime
};

const listener = Notifications.Push.onNotificationReceivedInForeground(
  myNotificationReceivedHandler
);

listener.remove(); // Remember to remove the listener when it is no longer needed
```
