https://kotlinlang.org logo
Title
n

nglauber

12/08/2021, 2:49 PM
hi. question regarding Navigation from Notification and keep backstack. My
MainActivity
is running and has the
ScreenA
and
ScreenB
in the backstack. If the user press the notification I would like to keep the
MainActivity
opened just adding the
ScreenC
to the backstack… Is there a way to do that?
Adding more information: • I’m using
TaskStackBuilder
to create the
PendingIntent
used in the notification. • My activity is declared as
singleTop
in the manifest.
i

Ian Lake

12/08/2021, 6:00 PM
No, Navigation enforces the correct back stack with every deep link. See the previous conversation: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1637119356059600?thread_ts=1637094032.055400&cid=CJLTWPH7S