1

In my application I want to use app links. For this in my AndroidManifest.xml I am defining activity as :

        <activity
        android:name="com.abc.xyz.DeepLinkActivity"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme.Transparent">

        <intent-filter android:autoVerify="true">
            <action android:name="android.intent.action.VIEW"/>
            <category android:name="android.intent.category.DEFAULT"/>
            <category android:name="android.intent.category.BROWSABLE"/>
            <data
                android:host="*.example.com"
                android:scheme="https"/>
            <data
                android:host="*.example.com"
                android:scheme="http"/>
        </intent-filter>
    </activity>

and for this I am defining assetlinks.json as :

{
  "relation": ["delegate_permission/common.handle_all_urls"],
  "target": {
    "namespace": "android_app",
    "package_name": "com.abc.xyz",
    "sha256_cert_fingerprints": ["10:0C:0C:C2:78:EA:3B:DA:CA:A3:43:57:D1:8B:EE:62:15:E6:08:99:77:F1:F7:F1:DF:9E:DF:3C:92:04:B8:62"]
  }
}

where fingerprint is defult android debug keystore fingerprint.

Only thing to point is that we are hosting assetslink.json at https://www.example.com/.well-known/assetlinks.json domain and not at https://example.com/.well-known/assetlinks.json domain. Can it be the cause. I seem to have been following all the guideline present at

https://developer.android.com/training/app-links/verify-site-associations.html#request-verify
duggu
  • 37,851
  • 12
  • 116
  • 113
Tarun Deep Attri
  • 8,174
  • 8
  • 41
  • 56
  • 1
    Filter logcat output with `SingleHostAsyncVerifier` during app installation. It will display the steps Android is taking to link your apps, and will print errors. – Simon Marquis Feb 09 '18 at 08:58
  • @SimonMarquis Thanks I can see which URL android is looking up and its status. – Tarun Deep Attri Feb 09 '18 at 09:42
  • Another link i found with some useful info about this issue : https://medium.com/@kenkyee/full-verification-of-assetlinks-json-for-android-smartlock-app-browser-sharing-and-applinks-f66bd57207a4 – Tarun Deep Attri Feb 09 '18 at 11:22

1 Answers1

0

As pointed out here android doesn't handle wildcards, so you should probably change

<data
    android:host="*.example.com"
    android:scheme="https"/>

to

<data
    android:host="example.com"
    android:scheme="https"/>

You can also use https://developers.google.com/digital-asset-links/tools/generator to test if site verifies your app.

Olga Sokol
  • 11
  • 1
  • 3