Deep Link not working in Chrome for Android Deep Link not working in Chrome for Android google-chrome google-chrome

Deep Link not working in Chrome for Android


You need to annotate the deep links using href="android-app://" in the HTML markup of your web pages. You can do this in the section for each web page by adding a tag and specifying the deep link as an alternate URI.

See example for Wikipedia

<meta name="generator" content="MediaWiki 1.24wmf15" /><link rel="alternate"  href="android-app://org.wikipedia/http/en.m.wikipedia.org/wiki/Apollo_17" /><link rel="alternate"   type="application/x-wiki" title="Edit this page" href="/w/index.php?  title=Apollo_17&action=edit" />

You need to add below code to you webpages:

<html><head>    <link rel="alternate"      href="android-app://com.example.android/example/gizmos" />...</head><body> ... </body>

Now to handle this intent in application and when you search for something and the link gives you an option for opening in wikipedia app as well, if you would like to support for both, then for that you need to modify your android app.

First, you need to add the scheme in your Manifest.

Here is how WikiPedia app works.

WikiPedia app adds the scheme, like below in their page view activity.

<activity android:name=".page.PageActivity" ><intent-filter>    <category android:name="android.intent.category.DEFAULT" />    <category android:name="android.intent.category.BROWSABLE" /> <data    android:scheme="http"    android:host="*.wikipedia.org"    android:pathPrefix="/wiki/" /><data    android:scheme="https"    android:host="*.wikipedia.org"    android:pathPrefix="/wiki/" /></intent-filter></activity>

You need to do same thing for your domain and it will work. If you need to make sure that your application is also shown in deep links Refer link1 and link2