Reputation: 979
I followed this android tutorial (http://developer.android.com/training/app-links/index.html) to implement app link feature in my app. However, when I check link polices with adb shell dumpsys package d
, it shows up under "App verification status" header but status is "undefined", it doesn't show up under "App linkages for user 0" header at all.
What I did was in AndroidManifest.xml:
<activity
android:name=".activities.SplashActivity"
android:label="@string/app_name"
android:noHistory="true" >
<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:scheme="http" android:host="myhost" />
<data android:scheme="https" android:host="myhost" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
In my app, I use the real host. And this activity is the only one in my app which I set scheme and host. In my site, I added this
[{
"relation":
[
"delegate_permission/common.handle_all_urls"
],
"target":
{
"namespace": "android_app",
"package_name": "mypackage",
"sha256_cert_fingerprints":
[
"myfingerprint1",
"myfingerprint2"
]
}
}
]
I tried to access this from browser with https://myhost/.well-known/assetlinks.json, it works.
However, after I install the app, wait for a while and run adb shell dumpsys package d
, it just says "undefined". Btw, I'm testing it on a M device.
Upvotes: 10
Views: 2153
Reputation: 1123
Faced the same issue.
For now I'm generating shortened URL from the app link url. This redirects it by default to the browser and browser then launches the app.
Doesn't fix the issue but is good enough for my requirement.
Upvotes: 2
Reputation: 6385
For me, the server was returning an invalid header with the assetlink file. You can hit the following URL to see if your assetlink file is valid. Just replace the example.com domain in the url with yours:
Upvotes: 3