The input object that holds the callback handler.
validation: InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.
onMessageReceived((message) => {
// use the message
console.log(message.id);
});
Registers a callback that will be invoked on
messageReceived
events.