Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onNotificationClicked not invoked when clicked on push-notification bubble #86

Open
mcicak opened this issue Oct 17, 2024 · 3 comments
Open

Comments

@mcicak
Copy link

mcicak commented Oct 17, 2024

KMPNotifier and Kotlin version:
kmpnotifier version: 1.3.0, kotlin version: 2.0.20

Describe the bug
Clicking on push notification doesn't result in onNotificationClicked invocation of NotifierManager.Listener

In which platform bug occurs?
android, ios

To Reproduce

  1. Setup a project with KMPNotifier
  2. Deliver push notification from firebase
  3. Click on notification
  4. onNotificationClicked is not invoked

Logcat output after tapping the notification bubble:

2024-10-17 12:28:29.884 20833-20860 EGL_emulation           rs.symphony.cicak.webshop            D  app_time_stats: avg=2498.19ms min=2.00ms max=22170.36ms count=9
2024-10-17 12:28:30.232 20833-20833 VRI[MainActivity]       rs.symphony.cicak.webshop            D  visibilityChanged oldVisibility=true newVisibility=false
2024-10-17 12:28:30.272 20833-20833 System.out              rs.symphony.cicak.webshop            I  Failed to add user to Firestore: Job was cancelled
2024-10-17 12:28:30.273 20833-20833 System.err              rs.symphony.cicak.webshop            W  kotlinx.coroutines.JobCancellationException: Job was cancelled; job=SupervisorJobImpl{Cancelling}@2d3963e
2024-10-17 12:28:30.274 20833-20833 WindowOnBackDispatcher  rs.symphony.cicak.webshop            W  sendCancelIfRunning: isInProgress=false callback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@5f3ef8c

Expected behavior
When user taps on notification bubble, onNotificationClicked should be invoked

Additional info to help reproduce
Demo project: https://github.com/mcicak/laboratory/tree/main/WebShop
Notifier manager initialisation: https://github.com/mcicak/laboratory/blob/main/WebShop/composeApp/src/commonMain/kotlin/rs/symphony/cicak/webshop/di/AppInitializer.kt

@mcicak
Copy link
Author

mcicak commented Oct 29, 2024

On Android, onNotificationClicked is invoked after I added NotifierManager.onCreateOrOnNewIntent(intent) in MainActivity's onCreate and onNewIntent methods.

@mirzemehdi
Copy link
Owner

is this still issue? @mcicak

@mcicak
Copy link
Author

mcicak commented Nov 30, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants