A callback handler to be invoked with the received PushNotificationMessage.
// Register a listener
onNotificationReceivedInForeground(message => {
doSomething(message);
});
// Register multiple listeners
onNotificationReceivedInForeground(message => {
doSomething(message);
});
onNotificationReceivedInForeground(message => {
doSomethingElse(message);
});
Registers a listener that will be triggered when a notification is received while app is in a foreground state.