react-native-sdk
react-native-sdk copied to clipboard
When hard-closed Android app is opened with push notifications, it doesn't handle next notifications
We've implemented Iterable push notifications with custom action as an open action. App handle them well with custom action handler, but there's one case when handler isn't triggered.
Steps to reproduce:
- Send the push notification and open hard closed app with it - it triggers the custom action handler.
- Send second notification
- Open second notification with app in foreground or background
- Custom action handler isn't triggered.
iOS notifications work fine in that case. Some additional things I noticed during debugging this issue:
- the second notification is sent and if app is in background, after pressing it in opens the app
- when I open the second notification and then use
Iterable.getLastPushPayload()
method, it returns the payload of the first nofication - logs from logcat after receiving and opening the second notification
itblFCMMessagingService: 💚 Iterable push received {additionalData={"appointmentId":"680b8352-f130-434e-9fd5-16abdaf6bb04"}, body=Appointment 2, itbl={"defaultAction":{"data":"action:\/\/openNotification","type":"action:\/\/newAppointmentNotification"},"isGhostPush":false,"messageId":"a51e8d14d342407eb39cd0ac9207f2b8","templateId":6862848}, title=New}
IterableNotification: 💚 channel name: null
IterableNotification: 💚 iconID: null
IterableNotification: 💚 No Notification Icon defined - defaulting to app icon
IterableNotification: 💚 Request code = 1687134412
IterableNotification: 💚 Request code = 1275959751
I noticed that IterableTrampolineActivity logs aren't log for that notification
- I found similar bug for Android sdk, the reproduction steps are similar: https://github.com/Iterable/iterable-android-sdk/issues/470
Additional tech details:
- I'm using RN v.0.66.4 and Iterable RN SDK v.1.3.6
- I tested it on Android 10 device
Can you please help me with debugging and fixing this issue? Thank you! Kasia
I have got the same issue in my app so I contacted the Iterable support team, they released the version 1.3.15 two weeks ago which was supposed to fix that issue. However, now it's even worse, all push notifications cause a crash of the app when they are opened and that the app is in background...
@KatarzynaLorek do you experience the same issue?
We also experiencing this issue @nicopir. Specifically on Android, if the app is closed, it opens the app but does not link through to the correct screen. If the app is backgrounded, it crashes and reopens (oddly enough to our logged out screen, even tho the user auth token is still valid and present).
Hi both @KatarzynaLorek and @nicopir thanks for sharing. Is this still replicable?