Push Notifications issue: only latest notification trigger the handler

On Android, if I send 2 different notifications to the same device, when I tap on a notification (no matter one of the two) it opens only the latest, ignoring the other one.

How to reproduce

Get the code here and run on your Android device;

Use the Token showed on app to send 2 notifications via Expo tool: Push Notification Tool — Expo

Insert the following data in tool:

Notification #1
Title: test 1
Body: body 1
Json Data: {“id”:1}

Notification #2
Title: test 2
Body: body 2
Json Data: {“id”:2}

Send notification #1 and then notification #2 to the same token, in this exact order: first #1, then #2.
If you open the app you’ll see that Origin works well on “received” mode.
Then tap on Notification #1, and you’ll see that it will be open Notification #2 instead and both notifications will disappear. You’ll see that Origin is now “selected” and Data has the Notification #2 data.

It seems to be a bug at least on SDK 27 and 28

Hi @codever - thanks for letting us know. We’re tracking this issue here: https://github.com/expo/expo/issues/1915.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.