Skip to content

Need event listener when notification onShow #441

@muslimmuda15

Description

@muslimmuda15

I need event listener when notif is fire by schedule time.

useEffect(() => {
      const type = 'notification';
      PushNotificationIOS.addEventListener(type, onRemoteNotification);
      return () => {
           PushNotificationIOS.removeEventListener(type);
      };
});

const onRemoteNotification = notification => {
      const actionIdentifier = notification.getActionIdentifier();
      console.log('NOTIF ACTION IDENTIFIER :', actionIdentifier);
}

I have no any text in my console when notif is fired.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions