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.
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.
@@_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
@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.
@@_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).
@@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
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.
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
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.
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.
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.
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?
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?
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€.
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.
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.
@@_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
@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.
@@_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).
@@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
We want a video properly showcasing the implementations of In-app purchases and subscriptions and also the Google AdMob. 🥺
You should at least buy him a coffee
@@EnelAlmonte definitely 😁
@@sayandbera- if he doesn't I will
I was thinking last night to put a comment for this tutorial on other videos of yours 😂
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?
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?
🎉 can you do tutorial with new navigation type safe and flowrow please
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.
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
you should try navigateUp() instead of popBackStack()
Thanks
your android studio look different than mine what is libs
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.
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.
Very nice!!! What happen if the app is not installed? Can we recover the parameter after link click -> store -> install it?
Firebase Dynamic Links can solve this
@@ThePepaNovak deprecated
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.
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?
I have same problem
@@nqmgaming2004Did you find a workaround?
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?
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€.
Make 2nd part how to verify deep link.
video about deeplinking in kotlin multiplatform mobile?
Hernandez William Lee Maria Walker Ronald
First comment