Thread
#android-architecture
    u

    ursus

    2 years ago
    How do you receive in the app? Do you use the DynamicLinks.getInstance.getDynanicLink thing or interogate the intent yourself?
    g

    ghedeon

    2 years ago
    They suggest that, yes and I can't imagine why. On android (as opposite to iOS) you're not supposed to register for dynamic links in Manifest. So, you're never actually going to receive them. What happens instead:
    Dynamic Link click --> browser --> universal link --> your app
    . And you're supposed to register for universal links, like www.myapp.com/foo. But then, why call Firebase at all?
    u

    ursus

    2 years ago
    True, i dont have the action_view in manifest and it works. I tried to only extract intent.data uri, but its null after install triggered via dynamic link when you dont have the app, which then kicks you to google play
    Can you tell your intent contains a dynamic link after the install?
    g

    ghedeon

    2 years ago
    the way they suggest you to set your project, I can't imagine dynamic link ever hitting your app. In case it's not installed, dynamic link redirects you to Play Store, after that it's unwrapped and the original universal link is thrown to your app. So, I'm getting the universal link in the intent, as expected, and never dynamic link.
    The more I think, the more it seems to me that Android documentation is wrong. It should be done same way iOS is documented. The irony is, they released 3 part video tutorial for iOS and only one part for Android, that basically says "How to configure your app will be explained in the next part". And the "next" part never came out since, lol.
    u

    ursus

    2 years ago
    after install you receive something in the activity intent? for me its always empty and works only if I route it throught the DynamicLjnks thing, which is async, so I cannot even show progressbar before it since I dont know if there is a link or not, facepalm
    and support dude told me to show progressbar implicitly everytime, in my MainActivity 😄 so I affect 99% of user flow for 1% dynamic link
    g

    ghedeon

    2 years ago
    after install you receive something in the activity intent?
    Yes, I receive the universal link I'm subscribed to in my Manifest.
    u

    ursus

    2 years ago
    Really? Are you sure? I tested that 200x times, and if the app ista installed then I receive intent.data, but when not, intent is empty. and only working thing is routing through this
    FirebaseDynamicLinks.getInstance()
                    .getDynamicLink(intent)
                    .addOnSuccessListener { data: PendingDynamicLinkData? ->
                        data?.link?.let {
                            doHandleInvitation(it, hasAccounts)
                        }
                    }
    g

    ghedeon

    2 years ago
    if the intet is empty as you said, what are you routing then?
    u

    ursus

    2 years ago
    just the intent instance, and I think internally the library makes some kind of external request. Looking at decompiled sources it pulls out a byteArray from the extras, and when I do so, its null.. its weird