react-native-sdk icon indicating copy to clipboard operation
react-native-sdk copied to clipboard

When hard-closed Android app is opened with push notifications, it doesn't handle next notifications

Open KatarzynaLorek opened this issue 2 years ago • 3 comments

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:

  1. Send the push notification and open hard closed app with it - it triggers the custom action handler.
  2. Send second notification
  3. Open second notification with app in foreground or background
  4. 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

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

KatarzynaLorek avatar Sep 22 '22 09:09 KatarzynaLorek

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?

nicopir avatar Jul 27 '23 09:07 nicopir

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).

ggustilo avatar Aug 09 '23 15:08 ggustilo

Hi both @KatarzynaLorek and @nicopir thanks for sharing. Is this still replicable?

jena-chakour avatar May 22 '24 21:05 jena-chakour