2

I'm trying to make my app appear in this screen: Download Apps List

So that I can download files using my app.. I added the following Intent filter into my manifest:

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

But this has no effect at all.. Is there a way to do that ?

2 Answers2

0

To use android:host and android:pathPattern, you need android:scheme as well.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
0

Try to change your intent-filter to this one :

<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:scheme="file" /> //or content
    <data android:mimeType="*/*" />
    <data android:pathPattern=".*\\.ext" />
    <data android:host="*" />
</intent-filter>
Skizo-ozᴉʞS ツ
  • 19,464
  • 18
  • 81
  • 148
  • this doesn't work.. should i declare the intent filter inside an activity or receiver ? – Muhammad A. Hassan Dec 03 '15 at 21:35
  • Yes, put it inside an Activity – Skizo-ozᴉʞS ツ Dec 03 '15 at 21:37
  • Also check it out this questions and answers : [1](http://stackoverflow.com/questions/1733195/android-intent-filter-for-a-particular-file-extension), [2](http://stackoverflow.com/questions/8148629/intent-filter-to-download-attachment-from-gmail-apps-on-android), [3](http://stackoverflow.com/questions/8148629/intent-filter-to-download-attachment-from-gmail-apps-on-android). – Skizo-ozᴉʞS ツ Dec 03 '15 at 21:38
  • I did all of that and checked the questions above but still not working. also tried changing pathPattern to ".*.ext" but didn't work neither – Muhammad A. Hassan Dec 03 '15 at 21:47