title: Android intent filter custom data scheme doesn't allow queryIntentActivities
body: <p>I'm trying to create a custom intent for my application so I can extend it by searching for installed packages that support my scheme and using them, essentially, as plugins. I have the following in my manifest</p>
  
  <pre><code>&lt;activity android:name=".myMagicActivity"&gt;
      &lt;intent-filter&gt;
          &lt;action android:name="com.mydomain.action.MYMAGICTHING"/&gt;
          &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;data android:scheme="mymagicthing" android:host="mydomain.com"/&gt;
     &lt;/intent-filter&gt;
  &lt;/activity&gt;
  </code></pre>
  
  <p>My test application runs fine and I can start the intent, see the data as expected. However, if I try to test for the existence of the intent first it will fail. <em>Always</em>. </p>
  
  <p>I'm using the following code to check </p>
  
  <pre><code>public static boolean isIntentAvailable(Context context, String action) {
      final PackageManager packageManager = context.getPackageManager();
      final Intent intent = new Intent(action);
  
      intent.addFlags(Intent.FLAG_DEBUG_LOG_RESOLUTION);
  
      List&lt;ResolveInfo&gt; list =
              packageManager.queryIntentActivities(intent,0);
      return list.size() &gt; 0;
  }
  </code></pre>
  
  <p>which is from the <a href="http://android-developers.blogspot.com/2009/01/can-i-use-this-intent.html" rel="nofollow" title="android developers">Android developers blog</a> The results are as follows:</p>
  
  <pre><code>02-28 21:56:54.186: V/IntentResolver(150): Resolving type null scheme null of intent Intent { act=com.mydomain.action.MYMAGICTHING flg=0x8 }
  02-28 21:56:54.186: V/IntentResolver(150): Action list: null
  02-28 21:56:54.186: D/INTENT(17088): Intent MISSING
  02-28 21:56:54.186: V/IntentResolver(150): Final result list:
  </code></pre>
  
  <p>If I remove the data element from the manifest, the detection of the intent works perfectly, but obviously no data is passed to the intent as it doesn't actually start.</p>
  
  <pre><code>02-28 22:11:14.886: V/IntentResolver(150): Resolving type null scheme null of intent Intent { act=com.mydomain.action.MYMAGICTHING flg=0x8 }
  02-28 22:11:14.886: V/IntentResolver(150): Action list: [ActivityIntentInfo{415df398 com.mydomain.myMagicActivity}]
  02-28 22:11:14.886: V/IntentResolver(150): Matching against filter ActivityIntentInfo{415df398 com.mydomain.myMagicActivity}
  02-28 22:11:14.886: V/IntentResolver(150):   Filter matched!  match=0x108000
  02-28 22:11:14.886: V/IntentResolver(150): Final result list:
  02-28 22:11:14.886: D/INTENT(17088): found intent
  </code></pre>
  
  <p>Any ideas what's wrong?</p>