urbanairship / capacitor-airship

1 stars 2 forks source link

Deeplink Handling Fails on Android Due to Incorrect Event Names in Notification Response Listener #5

Closed michaelschoenbaechler closed 4 months ago

michaelschoenbaechler commented 4 months ago

Preliminary Info

What Airship dependencies are you using?

Capacitor Plugin 1.1.0

What are the versions of any relevant development tools you are using?

Android Studio 2023.2.1 NPM 10.5.0

Report

What unexpected behavior are you seeing?

Deeplinks in Android do not trigger as expected because the onNotificationResponse listener is registered for an event named notification_response_received, which does not exist in Android.

Instead, Android uses BACKGROUND_NOTIFICATION_RESPONSE_RECEIVED and FOREGROUND_NOTIFICATION_RESPONSE_RECEIVED, which map to notification_response.

As a result, the listener is not notified upon receiving a push notification. This functionality works correctly in iOS.

What is the expected behavior?

The listener should be notified of the correct event in both Android and iOS, allowing deeplinks to function correctly when a push notification is received.

rlepinski commented 4 months ago

Thanks for the fix!