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

Поділитися
Вставка
  • Опубліковано 29 лис 2024

КОМЕНТАРІ • 34

  • @_runtime
    @_runtime 2 місяці тому +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 2 місяці тому +1

      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  2 місяці тому

      @@_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 2 місяці тому

      @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 2 місяці тому

      @@_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 2 місяці тому +1

      @@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

  • @sayandbera-
    @sayandbera- 2 місяці тому +14

    We want a video properly showcasing the implementations of In-app purchases and subscriptions and also the Google AdMob. 🥺

    • @EnelAlmonte
      @EnelAlmonte 2 місяці тому

      You should at least buy him a coffee

    • @sayandbera-
      @sayandbera- 2 місяці тому

      @@EnelAlmonte definitely 😁

    • @EnelAlmonte
      @EnelAlmonte 2 місяці тому

      @@sayandbera- if he doesn't I will

  • @mithileshdhupia2533
    @mithileshdhupia2533 2 місяці тому +2

    I was thinking last night to put a comment for this tutorial on other videos of yours 😂

  • @ИльяШелковенко
    @ИльяШелковенко 2 місяці тому

    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?

  • @OdeyKhalaf-n4x
    @OdeyKhalaf-n4x Місяць тому

    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?

  • @codeaveczgenius
    @codeaveczgenius 2 місяці тому +1

    🎉 can you do tutorial with new navigation type safe and flowrow please

  • @AakashmobileCoderz
    @AakashmobileCoderz 2 місяці тому

    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.

  • @Theo-os3zi
    @Theo-os3zi Місяць тому +1

    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 3 дні тому

      you should try navigateUp() instead of popBackStack()

  • @meshoraouf8929
    @meshoraouf8929 2 місяці тому

    Thanks

  • @knight0031
    @knight0031 Місяць тому

    your android studio look different than mine what is libs

  • @lindaporsius
    @lindaporsius 2 місяці тому

    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 2 місяці тому

      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.

  • @santyas
    @santyas 2 місяці тому

    Very nice!!! What happen if the app is not installed? Can we recover the parameter after link click -> store -> install it?

    • @ThePepaNovak
      @ThePepaNovak 2 місяці тому

      Firebase Dynamic Links can solve this

    • @santyas
      @santyas 2 місяці тому +1

      @@ThePepaNovak deprecated

    • @StingerAJ
      @StingerAJ 2 місяці тому

      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 2 місяці тому

    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 2 місяці тому

      I have same problem

    • @StingerAJ
      @StingerAJ 2 місяці тому

      @@nqmgaming2004Did you find a workaround?

  • @FebinAugustine
    @FebinAugustine 2 місяці тому

    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  2 місяці тому +1

      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€.

  • @ibrahimkhalilshakir2414
    @ibrahimkhalilshakir2414 2 місяці тому

    Make 2nd part how to verify deep link.

  • @xxPaperGunGuyxx
    @xxPaperGunGuyxx 2 місяці тому

    video about deeplinking in kotlin multiplatform mobile?

  • @ericarabarrington5718
    @ericarabarrington5718 2 місяці тому

    Hernandez William Lee Maria Walker Ronald

  • @ferreiraGAMER3
    @ferreiraGAMER3 2 місяці тому

    First comment