Skip to content

Android Notification not work in foreground #175

Open

Description

@LimanASL

Report

Environment

  • Platforms:
  • Android version:
  • iOS version:

Issues and Steps to Reproduce

Replaces this with steps to repro your issue, if applicable.

Expected Behavior

Describe what you expected would happen.

Actual Behavior

Describe what actually happened. Include screenshots, if applicable.

Link to Code

If you have some code that maintainers can clone/test for themselves, bugs can be resolved much faster. Please paste a link here.

Activity

  1. nithinyell commented on Sep 24, 2020

    @nithinyell

    +1

  2. LimanASL commented on Sep 25, 2020

    @LimanASL
    Author

    https://rnfirebase.io/messaging/notifications

    Regarding to the document from 'react-native-firebase', if the application is in the foreground, an event will be delivered containing the notification data and no visible notification will be displayed.

    In order to display the foreground notification, one of the solutions is use
    'react-native-push-notification' to handle the onRemoteNotification function

    import PushNotification from 'react-native-push-notification';
    
    onRemoteNotification(notification: any) {
      console.log(notification);
    
      PushNotification.localNotification({
        message: notification.message,
      });
    }
    
  3. nithinyell commented on Sep 30, 2020

    @nithinyell

    Thanks for the update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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