How to open my app by using an email attachment which will be of a custom extension/type?
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="*/*" />
        <data android:pathPattern=".*\\.xyz" />
    </intent-filter>

When I click on somefile.xyz it opens an Intent chooser which contains app's in which I have declaired above intent-filter(.xyz custom file type).But this works when file is in sdcard and I click on it.
How can i make this work for a file as an attachment because the problem is android is not allowing me to download unknown file types from email.
How to open my app by using an email attachment which will be of a custom extension/type?
===

    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="*/*" />
        <data android:pathPattern=".*\\.xyz" />
    </intent-filter>

When I click on somefile.xyz it opens an Intent chooser which contains app's in which I have declaired above intent-filter(.xyz custom file type).But this works when file is in sdcard and I click on it.
How can i make this work for a file as an attachment because the problem is android is not allowing me to download unknown file types from email.