Hey guys!
We’re trying to listen for incoming notifications so we can route to a particular page based on the data passed with the notification payload. We are doing this, as you might expect, via:
Notifications.addListener(this.handleNotification);
We’re sending notifications via our own notifications system, using device tokens obtained using:
const { data: token, type: platform } = await this.getDevicePushToken();
Something that’s arisen is that when a user taps a notification sent using a native device token, the listener doesn’t pick up on it at all. Notifications sent via an Expo push token are picked up by the listener as you would expect. Is there some kind of metadata we need to send with our notification payloads to get this to work? Is there something in the code that prevents notifications from other sources from working properly (something I can imagine on Android, but I’m not sure how this is possible on iOS)?
Any help would be much appreciated, even a pointer to a chunk of code so I can start to work on a PR!