Cordova-plugin-firebasex: Uncaught TypeError: window.FirebasePlugin.onNotificationOpen is not a function

Created on 28 Feb 2020  路  2Comments  路  Source: dpa99c/cordova-plugin-firebasex

Code worked fine before until old cordova-plugin-firebase became deprecated and i had to update everything and install cordova-plugin-firebasex since i couldn't compile app.
I'm able to get token and receive notification but only onNotificationOpen fails...

    window.FirebasePlugin.onTokenRefresh(function(token) { // This works
        saveToken(token);
    }, function(error) {
        console.error(error);
    });
    window.FirebasePlugin.onNotificationOpen(function(data) { //window.FirebasePlugin.onNotificationOpen is not a function
        alert('Notification'+JSON.stringify(data));
    });

Any suggestion?

Most helpful comment

onNotificationOpen has been replaced with onMessageReceived.
Please read the documentation,

All 2 comments

onNotificationOpen has been replaced with onMessageReceived.
Please read the documentation,

Thanks, works fine now =)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leabdalla picture leabdalla  路  7Comments

osamasado picture osamasado  路  6Comments

hastom picture hastom  路  6Comments

auron105 picture auron105  路  7Comments

Akz47 picture Akz47  路  6Comments