Handling specific routes in Android M app links
<p>Android M has added support for <a href="http://developer.android.com/training/app-links/index.html" rel="noreferrer">App links</a> by creating a special <a href="https://developers.google.com/digital-asset-links/" rel="noreferrer">assetlinks.json</a> on the web server to delegate link handling to a mobile app.</p>

<p>For example, here's the content of such file:</p>

<pre><code>[{
  "relation": ["delegate_permission/common.handle_all_urls"],
  "target": {
    "namespace": "android_app",
    "package_name": "com.costingtons.app",
    "sha256_cert_fingerprints": ["14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:"
     "A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5"]
  }
}]
</code></pre>

<p>Currently, the relation is defined as <code>common.handle_all_urls</code> which means any url will be routed to the app.</p>

<p>I would like the app to open specific routes, for example <a href="https://costingtons.com/products/a-product" rel="noreferrer">https://costingtons.com/products/a-product</a> would open in the app but <a href="https://costingtons.com" rel="noreferrer">https://costingtons.com</a> would open the web version.</p>

<p>Apple Universal Links similar configuration file can define <em>paths</em> to be opened in the app, and the syntax supports pattern matching like <code>/products/*</code> etc. </p>

<p>Is there any way to do something like that with App Links in Android ?</p>