0

In my application I'm currently using Navigation Jetpack following the single activity approach, only one activity and a bunch of fragments.

The app contains a fixed start destination, Home, then a special scenario for the first time experience.

  • Splash -> Onboarding -> Home ( only first time)
  • Splash -> Home

I'm trying to setup deeplink navigation but I found a particular scenario and I don't know how to solve it, let me explain:

When I open the app from a deeplink I see the correct screen but I press back I see the splash screen. What I want is to open the deeplink after the splash screen and over the Home or Onboarding, for when the user presses back they can continue inside the app.

How I can control the stack in a single activity?

extmkv
  • 1,991
  • 1
  • 18
  • 36
  • They only expose the ability to create a pending intent, but to "deep-link to the right destination" you'd have to manually invoke `navController.navigate` until you're supposedly where you think you should be. – EpicPandaForce Apr 17 '20 at 21:49

1 Answers1

0

is the issue the backstack in the Navigation Jetpack? Or showing the splash screen and then going to the deep link screen?

If the issue is the Navigation see if this answer assists you.

Basically you need to set a new nested graph and the home screen as the root of that nested graph.

Does that help?

Liaz Kamper
  • 108
  • 1
  • 7