Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to dismiss Notification when receiving Firebase Cloud Messages #1172

Comments

@hapo-hoangnh
Copy link

How to dismiss Notification when receiving Firebase Cloud Messages?

This code not working

// Optional: Flow type
import type { RemoteMessage } from 'react-native-firebase';

componentDidMount() {
    this.messageListener = firebase.messaging().onMessage((message: RemoteMessage) => {
        // Process your message as required
        return false;
    });
}

componentWillUnmount() {
    this.messageListener();
}
@Ehesp
Copy link
Member

Ehesp commented Jun 5, 2018

Please follow the issue template with your versions so we can help. I'll reopen once it's been edited.

You should also check out https://rnfirebase.io/docs/v4.2.x/messaging/introduction as you'll probably find what you're looking for there :)

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