title: Android applinks not working in released build but work correctly from a local install
body: <p>I have a <a href="https://play.google.com/store/apps/details?id=com.scribble.exquisitecorpse" rel="nofollow noreferrer">game</a> that is using applinks. The applinks work fine when running debug and release versions from my computer but don't work for the version downloaded from Google Play. With the Google Play version, I get a dialog asking which app should open the link.</p>
  <p>I use &quot;App Signing by Google Play&quot; and understand that the release APK is signed by Google and has a different signature. I've added the SHA-256 certificate fingerprint from the app signing certificate listed on Google Play to my <a href="https://letsdraw.fun/.well-known/assetlinks.json" rel="nofollow noreferrer">assetlinks.json</a> so it contains the fingerprint from both the local and Google Play versions.</p>
  <p>I've also downloaded a derived APK from Google Play and made sure that the fingerprint matches that in the assetlinks.json file.</p>
  <p>Here's an example URL, that when clicked in Android should open the app, which it does for a local build, but not in the Google Play version. Instead, I get a dialog asking which app should open the link.</p>
  <p><a href="https://letsdraw.fun/ec?parent=Z0ibN7m-H8jO1jCiMRQtY23VTpKjnIch" rel="nofollow noreferrer">https://letsdraw.fun/ec?parent=Z0ibN7m-H8jO1jCiMRQtY23VTpKjnIch</a></p>
  <p>I'm writing out the SHA256 fingerprint in logcat from the live release version to double check it's correct and it all looks fine.</p>
  <p>The original signed APK and Google Play signed APK can be downloaded from <a href="https://drive.google.com/drive/folders/1AsMB3UPXfk2qMDBaMIfcKdfBVDaV2APe?usp=sharing" rel="nofollow noreferrer">here</a>. Both of these APKs were downloaded from Google Play, one &quot;original&quot; and one &quot;derived&quot;, so they should be identical apart from the signing. Interestingly, they're slightly different sizes. 11,590,297 bytes vs 11,601,619 bytes.</p>
  <p>Looking at the output from <code>adb shell dumpsys package domain-preferred-apps</code> the original signed apk is</p>
  <pre><code>  Package: com.scribble.exquisitecorpse
    Domains: letsdraw.fun scribble-cloud.appspot.com scribble-cloud-v24-test-dot-scribble-cloud.appspot.com
    Status:  always : 200000000
  </code></pre>
  <p>Whereas the Google Play signed apk is</p>
  <pre><code>  Package: com.scribble.exquisitecorpse
    Domains: letsdraw.fun scribble-cloud.appspot.com scribble-cloud-v24-test-dot-scribble-cloud.appspot.com
    Status:  ask
  </code></pre>
  <p>When testing with the test page mentioned by @ymindstorm</p>
  <p><a href="https://developers.google.com/digital-asset-links/tools/generator" rel="nofollow noreferrer">https://developers.google.com/digital-asset-links/tools/generator</a></p>
  <p>I get the message</p>
  <blockquote>
  <p>Success! Host letsdraw.fun grants app deep linking to
  com.scribble.exquisitecorpse.</p>
  </blockquote>
  <p>Do you have any suggestions as to what could be causing this?</p>
  <p><strong>Update:</strong>
  I've now reported this to Google as a bug, as I can't work out what's going on.
  <a href="https://issuetracker.google.com/issues/162564916" rel="nofollow noreferrer">https://issuetracker.google.com/issues/162564916</a></p>