Skip to content

Messaging: How do you read custom data? #421

Closed Answered by robingenz
nijakobius asked this question in Q&A
Discussion options

You must be logged in to vote

Okay, this should work. Have you tried the following?

import { FirebaseMessaging } from '@capacitor-firebase/messaging';

const addNotificationReceivedListener = async () => {
  await FirebaseMessaging.addListener('notificationReceived', event => {
    console.log(event.notification.data);
  });
};

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@DevDianDankie
Comment options

@robingenz
Comment options

Comment options

You must be logged in to vote
4 replies
@robingenz
Comment options

Answer selected by nijakobius
@nijakobius
Comment options

@loama
Comment options

@loama
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants