Questions tagged [jetpack-compose-navigation]

200 questions
3
votes
1 answer

How to navigate from notification to specific screen in an android jetpack compose single activity application?

I want to navigate from a notification action button to a specific screen in my single activity application in compose. Based on this documentation I decided to use deep-link navigation. The problem is that when I click on the notification action…
3
votes
1 answer

Navigation is being called every time in Jetpack Compose

I'm implementing registration in my application and, after filling in the respective fields, I click on a button that will make a registration request to the API. Meanwhile, I place a Loading View and when I receive the successful response, I…
3
votes
2 answers

How to prevent multiple creation of a screen in jetpack compose navigation

I have a welcome screen containing two buttons:Login and Sign Up. Hence I have a screen for each one: login screen and sign up screen. Both of them are in the same NavGraphBuilder. Users can navigate from sign up screen to login screen and vice…
3
votes
1 answer

How to preserve WebView state in Jetpack Compose Navigation?

When using WebViews to display HTML content, and using a new Activity to show a new page, the state of all WebViews is automatically preserved and restored by the OS when a new WebView activity is opened/closed. This leads to an uninterrupted…
3
votes
1 answer

Starting Activity using Compose Navigation

I'm trying to launch an Activity by clicking on a button set on a BottomNavBar. There's a Compose Navigation set up using NavGraphBuilder.navigation() with a composable() call for each Compose screen like: navigation( startDestination = "home", …
3
votes
2 answers

Navigate back to previous composable screen Lifecycle.Event.ON_CREATE event call again

My question is that when i navigate back/popup to previous composable screen Lifecycle.Event.ON_CREATE event call again. For example i have two composable screen, first show list of item and send one is detail screen of specific item. When i…
3
votes
0 answers

Is it safe to use SharedFlow for ViewModel driven navigation?

I implemented ViewModel driven navigation as shown in my code below. Basic idea is a Singleton class NavigationManager which is available to both, composables and the ViewModel, via dependency injection. The NavigationManager has a SharedFlow…
3
votes
1 answer

Jetpack Compose Deeplink navigation from Oauth

I'm trying to get the code from GitHub Oauth API playground://gh?code=XYZ in the ViewModel through savedStateHandler. My composable screen configuration: NavGraphBuilder.composable( route = "login", deepLinks = listOf(navDeepLink…
peter.o
  • 3,460
  • 7
  • 51
  • 77
3
votes
1 answer

Jetpack compose navigation with viewModel

I'm trying to use Jetpack Compose navigation inside viewModel. when navigation gets triggered nothing happens. here's my approach: I define NavigationDestination. In my case, I have four screen: welcome, sign in, sign up, and survey interface…
3
votes
0 answers

Jetpack Compose Navigation Deeplink handling for Files

I've been playing with Compose Navigation for a while and stumbled across this use case: When a user clicks on a File in his FileManager which my App can open, i want to jump to the specific screen where the user can view this file: I have a working…
3
votes
1 answer

How to control a Scaffold's FloatingActionButton onClick from child composable?

Is it possible to set the value of a FloatingActionButton's onClick inside of a Scaffold from a screen composable from a NavHost, which is also inside the Scaffold? Here in my example, I want to be able to change the FAB's onClick to do some…
3
votes
1 answer

How to change icon if selected and unselected in android jetpack compose for NavigationBar like selector we use in xml for selected state?

I want to use outlined and filled icons based on selected state in NavigationBar just like google maps app, using jetpack compose. In case of xml we use selector so what do we use for compose ? Here is my code…
3
votes
1 answer

Cast Error on passing Integer Nav Argument using SavedStateHandle in Compose

I am trying to navigate from the first screen to a second screen and I need to provide an integer identifier to load stuff from API on the second screen. I'm running into this error when trying to pass an Int Nav…
Tonnie
  • 4,865
  • 3
  • 34
  • 50
3
votes
0 answers

Navigation in Jetpack Compose - Fragments/ViewModels

So I'm checking this official Compose tutorial https://developer.android.com/courses/pathways/compose There is Jetpack Compose Navigation https://developer.android.com/codelabs/jetpack-compose-navigation So basically in that sample there is just one…
3
votes
1 answer

Dependency issues in navigation with Android Jetpack Compose

I am exploring compose navigation as specified in the docs. Adding the dependency with version 2.4.0-alpha07 as specified in docs, gives the following error, Error 1 One or more issues found when checking AAR metadata values: The minCompileSdk (31)…
Abhimanyu
  • 11,351
  • 7
  • 51
  • 121