Amplify JS API Documentation
    Preparing search index...
    onNotificationOpened: OnNotificationOpened

    Registers a listener that will be triggered when a notification is opened by user.

    A callback handler to be invoked with the opened PushNotificationMessage.

    • An object with a remove function to remove the listener.
    // Register a listener
    onNotificationOpened(message => {
    doSomething(message);
    });
    // Register multiple listeners
    onNotificationOpened(message => {
    doSomething(message);
    });

    onNotificationOpened(message => {
    doSomethingElse(message);
    });