I'm developing an app still in its early stages. I'm learning jetpack navigation as it goes.
In short, I need to create a splashscreen, it would do its stuff (initializing etc..) then navigate to the registration/login flow(not implemented yet) or to the main flow (which uses a BottomNavigationView
). So I though the easiest way would be to create a SplashscreenActivity
and then navigate to MainActivity
.
Only I can't figure out how to navigate from SplashscreenActivity
to MainActivity
, because findNavController()
which I usually use in fragments, for activities requieres the id of the navController
which I don't think it makes much sense in this case. Is it even possible to achieve that using the jetpack navigation?
Of course, I think I can always go for the good old startActivity()
, but is that the right way to go?
Would I just be better with creating a SplashscreenFragment
and handle everything in MainActivity
?