title: Android - start an activity from command line using intent uri
body: <p>I have an Activity A with the following intent filter</p>
  
  <pre><code>    &lt;activity
          android:name="com.comp.pac.ActivityA"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.VIEW"/&gt;
              &lt;category android:name="android.intent.category.DEFAULT"/&gt;
              &lt;category android:name="android.intent.category.BROWSABLE"/&gt;
              &lt;data android:scheme="customapp"
                    android:host="show"
                    android:path="/"/&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>I am basically trying the custom data scheme in intent filters as explained <a href="https://developers.google.com/chrome/mobile/docs/intents" rel="noreferrer">here</a></p>
  
  <p>To test whether the IntentUri launches the activity or not I'm trying to fire the intent using the following command through terminal :</p>
  
  <pre><code>adb shell am start intent://show/#Intent;scheme=customapp;package=com.comp.pac;end
  </code></pre>
  
  <p>I get the following error :</p>
  
  <pre>
  Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=intent://show/ flg=0x10000000 }
  </pre>
  
  <p><strong>Question : Is there anything wrong with the command? If not, what is the easiest way to test whether the intent uri starts the activity?</strong></p>
  
  <p>The instructions for using the <code>adb</code> command to start activity using intent uri is available <a href="http://developer.android.com/tools/help/adb.html#am" rel="noreferrer">here</a>.</p>