Open raphaelpreston opened 5 years ago
LaunchData isn't set on Android upon launching the app through a notification.
Here is the console output after being launched with a notification tap on Android:
> Firebase token: <token> > No launch data received.
Here is the console output after being launched with a notification tap on iPhone:
> Firebase token: <token> Custom Launch Data Detected: { aps: { alert: { title: <title>, body: <body> } }, 'gcm.notification.data': '{<myCustomData>}', 'google.c.a.e': '1', optinaldata1: 'value', 'gcm.message_id': <id> }
/* ask for permissions */ if (device.platform == 'iOS') firebase.Messaging.requestPermissions(); console.log("Firebase token: " + firebase.Messaging.token); setTimeout(() => { // workaround for Issue #41 if (typeof firebase !== "undefined") { if (typeof firebase.Messaging.launchData !== "undefined" && firebase.Messaging.launchData) { console.log("Custom Launch Data Detected: ", firebase.Messaging.launchData); } else { console.log("No launch data received."); } } });
Workaround for #41
We are looking into the issue. How did you send the cloud message?
Problem description
LaunchData isn't set on Android upon launching the app through a notification.
Here is the console output after being launched with a notification tap on Android:
Expected behavior
Here is the console output after being launched with a notification tap on iPhone:
Environment
Code snippet
Workaround for #41