android / nowinandroid

A fully functional Android app built entirely with Kotlin and Jetpack Compose
Apache License 2.0
17.32k stars 3.15k forks source link

[Bug]: Deeplink navigation duplicate MainActivity and mess up back navigation #1509

Open ar2code opened 5 months ago

ar2code commented 5 months ago

Is there an existing issue for this?

Is there a StackOverflow question about this issue?

What happened?

How to reproduce the bug:

  1. Clear Now In Android app from launched list (means no activity exists).
  2. Get any notification from SystemTrayNotifier
  3. Navigate to app from notification
  4. Go back until you close the app
  5. Open app again
  6. Try to go back again - you will see main screen twice before going to home screen

Thank you!

Relevant logcat output

No response

Code of Conduct

anhtuannd commented 5 months ago

I was unable to reproduce this bug. Do you have video for it?

ar2code commented 5 months ago

Sure, thanks!

now_in_android_bug

ar2code commented 5 months ago

For debugging I just edited NiaApplication onCreate method with:

val notifier = SystemTrayNotifier(this) notifier.postNewsNotifications( listOf( NewsResource( id = "test", title = "test", url = "test", content = "test", headerImageUrl = null, publishDate = Clock.System.now(), type = "test", topics = emptyList(), ), ), )