Deferred Deep Linking URL in Android
Asked Answered
A

4

14

I want to implement deferred deep linking in my android app. My understanding is I need to provide a url and when user opens the url, it will direct user to the app or to play store if the app has not been installed. From my research, seems Android is able to resolve deferred deep linking by default. But my question is where is the URL from? Does Google have any url builder to generate it for me or do I need to have a website and write some code for the url?

Anthurium answered 29/9, 2016 at 20:25 Comment(2)
You will need to implement your a Router, and define links which point to pages.Kamat
@Kamat Actually he doesn't need to do anything of the sort, he just needs an intent filter in his manifest to do the deep link.Shivers
C
7

The answers and comments so far are all referring to normal deep linking. None of them will get you deferred deep linking (i.e., the ability to deep link even when the app is not installed yet and the user needs to first visit the Play Store to download it).

Vanilla iOS does not support deferred deep linking at all. Android can do it with the Android Google Play referrer, but it is unreliable and doesn't work at all from Chrome.

To do this, you'll likely want to investigate a free third-party service like Branch.io (full disclosure: I am on the Branch team). The Branch platform abstracts all the technical details and edge cases away, so all you need to worry about is defining a set of key/value parameters (for example: articleID: story123) when you create a link. Branch makes sure those parameters are returned to you inside the app the first time it launches after the user clicks the link, whether or not the app was installed when the link was clicked. You can then use the values to route/customize however you wish.

Claribelclarice answered 1/10, 2016 at 4:12 Comment(6)
Why did you say Android Google Play referrer is not reliable and does not work at all from Chrome?Anthurium
It had been broken for a while, but it looks like it may recently have been fixedClaribelclarice
Is your linking service really free? Looking at the pricing it seems to indicate up-to 10k.Miniaturize
Basic linking is free at any scale!Claribelclarice
@AlexBauer Is this deferred deep linking considered "basic linking" on your platform? Thanks for your answer here.Fungistat
@ReedSpool sure is! All Branch links have deferred capabilities baked in standard.Claribelclarice
H
7

Firebase Dynamic Links seems to be the official Android way to support the deferred deep link that will send user across the installation UI if needed. It also works with iOS and Web.

Hellbox answered 17/11, 2018 at 23:9 Comment(1)
"Firebase Dynamic Links is no longer recommended for new projects. In the future, the Dynamic Links service will shut down, but you will have at least 12 months from the announcement date to migrate. We will announce more information in Q3 2023." firebase.google.com/support/dynamic-links-faqFaintheart
S
4

The url comes from any app or the user. Its just a normal app in the form http://example.com/path. THe magic is that your manifest registers an intent filter for the http scheme and the example.com/path path, and Android will take any intent that has an ACTION_VIEW for that url to your app. If your app isn't installed, since its an http url it falls back to the browser. If the url happens to go or redirect to the play store, then it gets you that behavior as well.

Shivers answered 29/9, 2016 at 21:1 Comment(1)
can you please give some exampleUnderquote
B
1

You can try using this scheme(to be sent to the user):

intent://details?id=X&url=Y&referrer=Z#Intent;scheme=market;action=android.intent.action.VIEW;package=com.android.vending;end";

X: Package name of the App

Y: Deep link scheme which should be defined in the App's manifest. (Please refer this) Here, they have used this URL as an example: "http://www.example.com/gizmos" , therefore Y should be replaced by this URL.

Z: Can be any data which you want to pass to the App via Google Play. Please take note that any data which you pass should not be '&' separated because the original parameters are itself '&' separated.

From what I experimented, this URL is understood by the browser and it redirects you to the App based on the package name and the deep-link scheme. Else it takes you to the Google Play.

PS: The Google Play makes a broadcast to the app. So make sure you receive the broadcast in a receiver.

Bolger answered 26/3, 2019 at 18:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.