Robert C
07/22/2024, 9:52 AMStylianos Gakis
07/22/2024, 10:11 AMRobert C
07/22/2024, 10:27 AMStylianos Gakis
07/22/2024, 10:41 AMRobert C
07/22/2024, 10:42 AMBackHandler {
destinationsNavigator.navigateUp()
}
in GraphADestinationB. Give me a minute to "shadow" it a littleStylianos Gakis
07/22/2024, 10:45 AMRobert C
07/22/2024, 10:50 AMStylianos Gakis
07/22/2024, 1:17 PMRobert C
07/22/2024, 1:19 PMStylianos Gakis
07/23/2024, 8:15 AMWhen your app is launched using a deep link on another app's task, Up transitions users back to your app's task and through a simulated back stack and not to the app that triggered the deep link. The Back button, however, does take you back to the other app.
So if you do actually open this app using a deep link specifically, but from inside another app, then you should get the correct behavior of navigateUp taking you to SubgraphADestinationARobert C
07/23/2024, 8:41 AMStylianos Gakis
07/23/2024, 8:43 AMRobert C
07/23/2024, 8:46 AMval intent = Intent(Intent.ACTION_VIEW)
intent.setData(Uri.parse("<myapp://screenB>"))
startActivity(intent)
instead of
navController.navigate("<myapp://screenB>".toUri())
creates a proper synthetic backstack so far, animation is a bit clunky after a first navigateUp but it saves a lot of manual backstack building
setting
android:launchMode="singleInstance"
in a target activity fixes clunky animation which in my case results in correct app behaviourStylianos Gakis
07/23/2024, 10:55 AM