title: intent-filter for a service : using a custom mime type
body: <p>I want to add a custom mime so that my  Android Service or a BroadcastReceiver would detect my custom files.
  I have seen answers to questions like <a href="https://stackoverflow.com/questions/5744944/how-to-add-custom-mime-type">How to add custom mime type?</a> and <a href="https://stackoverflow.com/questions/5744944/how-to-add-custom-mime-type">How to add custom mime type?</a></p>
  
  <p>The answers here are shown for an Activity. But what modifications are required for service or BroadcastReceiver?  I tried the same code for them, but it did not work.
  I am new to android development. Some nice and detailed explanation is welcome. Is it possible?
  Where am I going wrong.</p>
  
  <p>The code that I used is :</p>
  
  <pre><code>   &lt;service android:name="XcardReceivedService"
          android:exported="true"
          android:enabled="true"&gt;
  
  
             &lt;intent-filter&gt;
                      &lt;!--   &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;
                      --&gt;
                      &lt;data android:scheme="file" /&gt;
                      &lt;data android:mimeType="*/*" /&gt;
                      &lt;data android:pathPattern=".*\\.Xcard" /&gt;
                      &lt;data android:host="*" /&gt;
  &lt;/intent-filter&gt;
  
  
        &lt;/service&gt;
  </code></pre>