Full verification of assetlinks.json for Android SmartLock App/Browser Sharing and AppLinks

Ken Yee
2 min readDec 14, 2016

After you’ve put your https://www.<yourdomain>.com/.well-known/assetlinks.json file in place, there are a few ways to test that things are set up right.

You can do a server side test via the test tool (as covered in the AppLinks documentation) that goes and checks all your web sites listed in the assetlinks file to make sure they’re accessible: https://developers.google.com/digital-asset-links/tools/generator

If you want to verify your manifest client side, open up two terminal windows and leave “adb logcat” in one while you do an “adb install <yourapp>.apk” in the other. You’ll see a bunch of verifications of your app’s signature w/ the web sites in your deeplink intents and at the very end, you’ll see something that says:

12–14 12:51:19.666 1614 21858 I IntentFilterIntentSvc: Verification 3 complete. Success:false. Failed hosts:www.staging.yourdomain.com,www.dev.runwaynine.com.

In our case, we have intent filters that go to our dev and staging server for deeplink testing before it hits production. For AppLinks to work, *all* your deeplink hostnames have to be verifiable externally by Google’s servers; if any of them can’t be verified, AppLinks won’t work. You can expose your testing servers externally or remove them from your deeplink intent filters list and special builds for QA if they need to test them internally.

p.s., the assetlinks.json file may also be cached by Play Services on your device and also on Google’s servers, so it may take a few days for them to be updated from any changes you make to your web servers. And SmartLock chrome/app login sharing needs your APK to be downloaded from Google’s app store.

--

--

Ken Yee
Ken Yee

Written by Ken Yee

Mobile (Native Android), Backend (Spring Boot, Quarkus), Devops (Jenkins, Docker, K8s) software engineer. Currently Kotlin All The Things!

Responses (6)