Mbt925
11/01/2023, 12:17 PMintent looks like the following:
• Before migrating to compose: Intent -> Activity (onCreate & onNewIntent) -> RootFragment -> route to the destination
• After migrating to compose: Intent -> Activity (onCreate & onNewIntent) -> RootFragment -> route to the compose NavHost -> route to the compose destination
The hybrid solution looks too complicated. There are many paths to cover, to name a few:
• The intent delivered to onCreate call is handled automatically by compose NavHost, but not in other cases. Moreover, the handled intent is not cleared, thus the compose NavHost will handle the intent every time we navigate to it.
• If the compose NavHost is already open and active, the behavior is different than when it's not. If it's active, we can have an Intent consumer listener set and act upon the incoming intent, if not, we need to deliver the deeplink somehow to the NavHost.
Is it the way we're supposed to implement this? Is there a simpler, more unified way of handling deeplinks that works for a hybrid app (View & Compose)?Stylianos Gakis
11/02/2023, 2:19 PMMbt925
11/02/2023, 2:33 PMStylianos Gakis
11/02/2023, 2:36 PMnormal fragment navigation that’s still with androidx.navigation I suppose?Mbt925
11/02/2023, 2:39 PMStylianos Gakis
11/02/2023, 2:41 PMMbt925
11/02/2023, 2:45 PMandroidx.navigation. How does that change your answer? 😊Stylianos Gakis
11/02/2023, 2:51 PMMbt925
11/02/2023, 3:04 PMStylianos Gakis
11/02/2023, 3:14 PM