title: Launching custom Android application from Android browser / Chrome
body: <p>First of all, my question is extremely similar to <a href="https://stackoverflow.com/questions/2958701/launch-custom-android-application-from-android-browser">this</a>, <a href="https://stackoverflow.com/questions/525063/android-respond-to-url-in-intent">this</a> and <a href="https://stackoverflow.com/questions/8624315/make-android-app-listen-to-shared-links">this</a>. The Android documentation for what I'm trying to achieve is <a href="http://developer.android.com/guide/components/intents-filters.html" rel="noreferrer">here</a>. I couldn't get this to work using these resources so please don't mark this as duplicate as it is not.</p>
  
  <p>I have a website and an Android application. The user will be able to scan QR codes that contain links like <a href="http://mywebsite.com/map/" rel="noreferrer">http://mywebsite.com/map/</a>. When the user tries to open this link, I want Android to show him a chooser dialog where he can choose to open that link using my application. If my application is not installed, it should proceed to the specified website.</p>
  
  <p>I know Chrome allows this by opening the chooser dialog when the user navigates to that address. For example, try downloading the <a href="https://play.google.com/store/apps/details?id=com.stackexchange.marvin" rel="noreferrer">Stack Exchange app</a> and going to this question in Chrome. It will show this: </p>
  
  <p><img src="https://i.stack.imgur.com/tSMYL.png" alt="Screenshot of chooser dialog."></p>
  
  <p>I have added the following code in AndroidManifest.xml after following the suggestion in the above-mentioned answers:</p>
  
  <pre><code>&lt;intent-filter&gt;
      &lt;action android:name="android.intent.action.VIEW" /&gt;
      &lt;action android:name="android.intent.action.SEND" /&gt;
  
      &lt;category android:name="android.intent.category.DEFAULT" /&gt;
      &lt;category android:name="android.intent.category.BROWSABLE" /&gt;
  
      &lt;data
          android:host="mywebsite.com"
          android:path="/map"
          android:scheme="http" /&gt;
      &lt;data
          android:host="mywebsite.com"
          android:path="/animals"
          android:scheme="http" /&gt;
      &lt;data
          android:host="mywebsite.com"
          android:path="/articles"
          android:scheme="http" /&gt;
  &lt;/intent-filter&gt;
  </code></pre>
  
  <p>Also, I have tried adding android:mimeType="text/plain" to data but it didn't help.</p>
  
  <p><strong>The problem is that when I go to <a href="http://mywebsite.com/map" rel="noreferrer">http://mywebsite.com/map</a> or <a href="http://mywebsite.com/map/" rel="noreferrer">http://mywebsite.com/map/</a> Chrome just opens the webpage without showing the chooser dialog.</strong></p>
  
  <p>I would like to mention:</p>
  
  <ul>
  <li>following the Android documentation, I have added this code inside one of the activity structures in AndroidManifest.xml. As I am not sure this is the perfect place to add it, I have also tried adding it outside the application structure and directly inside the application structure but it didn't work</li>
  <li>this is the only code I have implemented for this to work. If something else is needed please let me know. From what I understand, adding a href to the webpage is only needed when using custom schemas</li>
  <li>I do not want to use a custom schema in order to achieve this</li>
  <li>I am developing on a Nexus 4, running Android 4.4.2 (latest)</li>
  </ul>