Full Guide to Deep Linking With Type-Safe Jetpack Compose Navigation

  Рет қаралды 9,335

Philipp Lackner

Philipp Lackner

Күн бұрын

Пікірлер: 35
@_runtime
@_runtime 3 ай бұрын
The interesting case would be to implement a deep link into a screen that's supposed to be protected by a login. That's the case for the vast majority of the apps. All those screens need to have a common path of jumping to login flow and back, which was usually stopping me from using the deep link features of the navigation library, I was implementing it myself by first handling the authentication and then routing manually. Would be interesting to see a guide that combines provided deep link features with "protected" screens.
@CSAbhiOnline
@CSAbhiOnline 3 ай бұрын
I think you can declare a global variable which holds if logged in or not. When performing actions with deep links, check the variable and send users for login screen if they're not logged in.
@PhilippLackner
@PhilippLackner 3 ай бұрын
@@_runtime all you need is a check on that screen whether the user is still logged in. If not, send them to the login screen. You'll need that anyways so it's not really related to deep linking
@_runtime
@_runtime 3 ай бұрын
@PhilippLackner yes, that's the difficulty. In the old xml world it was ugly, all of the screens where you can deep link, had a navigation action towards the login screen, the nav graph visualization was messy with a lot of lines. And a base-fragment-class-like solution was needed to reuse this logic for 15 different screens where you could deep link to. In the new world all of the screen composables will need the same generalization, but I guess the nav library will save the argument values once you come back from login screens.
@StingerAJ
@StingerAJ 3 ай бұрын
@@_runtime You could always use a global nav-action that you can use from everywhere. Besides, the "new" type-safe navigation is really only a serialization-layer on-top of the old navigation framework. So, if you think about it, if you have a messy nav-graph, you have it in both use cases, and there is potential to improve on it (and the XML-preview really only visualizes the mess better).
@ch1pkavarenychenko84
@ch1pkavarenychenko84 3 ай бұрын
@@PhilippLackner from my experience it is related to the deep linking because while user is on the login screen app should store somewhere(for example in the remember state or in the ViewModel state) the deep link uri to consume this link later from the main screen. I've done it in my project and it will be very interesting to see someone other implementation - maybe I missed something and there is a better approach
@lindaporsius
@lindaporsius 3 ай бұрын
Impressive! Could you find the time to make a video about optimizing builds? AS Koala offers an overview of what can be improved after each build, but I have no idea how to go about it.
@StingerAJ
@StingerAJ 3 ай бұрын
Most of the times, the optimization-bottlenecks are with some gradle-plugin developers for code-generating plugins, since some of these still do not do their work incrementally, so if their step is executed, they do all the work all over again, and there is little you as an app developer can do about it (besides contacting the plugin-developer with change-requests and wait and hope for them to improve build times). Another thing you can then do, is modularize your app project more, and put gradle-modules of your app, that rarely change, into their own app projects and declare them as a dependency in your app-project. That way, you don't have to rebuild them all the time you rebuild your app.
@sayandbera-
@sayandbera- 4 ай бұрын
We want a video properly showcasing the implementations of In-app purchases and subscriptions and also the Google AdMob. 🥺
@EnelAlmonte
@EnelAlmonte 3 ай бұрын
You should at least buy him a coffee
@sayandbera-
@sayandbera- 3 ай бұрын
@@EnelAlmonte definitely 😁
@EnelAlmonte
@EnelAlmonte 3 ай бұрын
@@sayandbera- if he doesn't I will
@mithileshdhupia2533
@mithileshdhupia2533 4 ай бұрын
I was thinking last night to put a comment for this tutorial on other videos of yours 😂
@ИльяШелковенко
@ИльяШелковенко 3 ай бұрын
Hi Philipp, thank you for your content, i want to ask , is there a possibility to add union pay payment method to buy your cources?
@AakashmobileCoderz
@AakashmobileCoderz 3 ай бұрын
I have a SplashScreen as StartDestination in my app where I show animation and navigate away onAnimationFinished. It is launched before anything else when clicking on a notification. I come with an ID from Notification then I have a dedicated Loading Screen where I am making an API request to load all the data required for detail screen. After that deep linked detail screen is opened. Loading data from API and navigating to Detail Screen happens before Splash Screen animation ends so when I navigateUp or backpress, SplashScreen is already there and it again starts to animate. I am still trying to figure it out.
@codeaveczgenius
@codeaveczgenius 3 ай бұрын
🎉 can you do tutorial with new navigation type safe and flowrow please
@Theo-os3zi
@Theo-os3zi 3 ай бұрын
Currently it seems to be wiping the backstack.. Is there a way to keep backstack after Deeplink? Current behaviour: Main -> Notifications > Deeplink. After popBackStack(): Main Expected: Main -> Notifications > Deeplink. After popBackStack(): Main -> Notifications
@sevbanthebuyer
@sevbanthebuyer Ай бұрын
you should try navigateUp() instead of popBackStack()
@santyas
@santyas 3 ай бұрын
Very nice!!! What happen if the app is not installed? Can we recover the parameter after link click -> store -> install it?
@ThePepaNovak
@ThePepaNovak 3 ай бұрын
Firebase Dynamic Links can solve this
@santyas
@santyas 3 ай бұрын
@@ThePepaNovak deprecated
@StingerAJ
@StingerAJ 3 ай бұрын
Deeplinks should be setup as Google App Links, as they call it, webpage-URLs for your webpage, that webpage is associated with your app. If your app is not installed, the webpage is simply opened (and the webpage can advertise the app). If the app is installed, instead of opening the webpage or opening a choice-dialog for app/webpage, the user is directly taken into the app via the webpage-URL.
@StingerAJ
@StingerAJ 3 ай бұрын
Did you also have the problem in Android Chrome, that if you already are on an associated website and open links staying on the same page, that some of those links open the deeplinked app instead? If so, how did you cope with this behavior?
@nqmgaming2004
@nqmgaming2004 3 ай бұрын
I have same problem
@StingerAJ
@StingerAJ 3 ай бұрын
@@nqmgaming2004Did you find a workaround?
@FebinAugustine
@FebinAugustine 3 ай бұрын
Unfortunately now only i saw your 10 day ago video about the new master class which has a 1 week valid 30% Promo code. I really like to buy the industry level developer bundle and i missed the opertunity to buy those valuable courses...😢. Is there any chance i get that 30% now. Suppose if i had that promo code available now, currently its showing 449 on your website is that after 30% or will i get an additional 30% from 449?
@PhilippLackner
@PhilippLackner 3 ай бұрын
Sorry that's not possible, the sale was mentioned across my socials in multiple videos, but at some point there has to be an end. When there is a public sale, the discount is on top of the displayed price, so in your case on top of the 449€.
@knight0031
@knight0031 2 ай бұрын
your android studio look different than mine what is libs
@OdeyKhalaf-n4x
@OdeyKhalaf-n4x 2 ай бұрын
What if i have more than one argument? And what if the deep link pattern is a queryParam like Can i also get type safe arguments from the URL?
@xxPaperGunGuyxx
@xxPaperGunGuyxx 3 ай бұрын
video about deeplinking in kotlin multiplatform mobile?
@meshoraouf8929
@meshoraouf8929 4 ай бұрын
Thanks
@ibrahimkhalilshakir2414
@ibrahimkhalilshakir2414 3 ай бұрын
Make 2nd part how to verify deep link.
@ericarabarrington5718
@ericarabarrington5718 3 ай бұрын
Hernandez William Lee Maria Walker Ronald
@ferreiraGAMER3
@ferreiraGAMER3 4 ай бұрын
First comment
derivedStateOf VS. remember(key) - THIS is Really the Difference 🤯
14:46
The Top 5 Practices That Make My Android Architecture More Scalable
17:05
Маусымашар-2023 / Гала-концерт / АТУ қоштасу
1:27:35
Jaidarman OFFICIAL / JCI
Рет қаралды 390 М.
진짜✅ 아님 가짜❌???
0:21
승비니 Seungbini
Рет қаралды 10 МЛН
Navigation Compose meet Type Safety
16:50
Android Developers
Рет қаралды 18 М.
*Next-door 10x Software Engineer* [FULL]
4:50
Programmers are also human
Рет қаралды 874 М.
I've Used Jetpack Compose For 4 Years - Here's the Good and the Bad
16:12
Intents & Intent Filters - Android Basics 2023
25:36
Philipp Lackner
Рет қаралды 85 М.
Swagger is Gone in .NET 9! Replace It With This.
9:34
Nick Chapsas
Рет қаралды 91 М.
Type-Safe Nested Navigation in Jetpack Compose | Ultimate Guide
12:39
Advanced layout animations in Compose (Shared elements)
30:33
Android Developers
Рет қаралды 24 М.
ViewModels & Configuration Changes - Android Basics 2023
18:46
Philipp Lackner
Рет қаралды 139 М.
FULL Guide to Kotlin's Inline Keyword (inline, crossinline & noinline)
16:35
Маусымашар-2023 / Гала-концерт / АТУ қоштасу
1:27:35
Jaidarman OFFICIAL / JCI
Рет қаралды 390 М.