2

I`m trying to make something like downloadmanager and i got trouble with intent-filters. My intent filter for catching file download intents is like this:

<intent-filter>
     <action android:name="android.intent.action.VIEW" />
     <category android:name="android.intent.category.BROWSABLE" />
     <category android:name="android.intent.category.DEFAULT" />
     <data android:scheme="http" />
     <data android:scheme="https" />
     <data android:scheme="ftp" />
     <data android:scheme="file" />
     <data android:scheme="data" />
     <data android:scheme="info" />
     <data android:scheme="data" />
     <data android:scheme="smb" />
     <data android:scheme="nfs" />
     <data android:scheme="content" />
     <data android:host="*" />
     <data android:pathPattern=".*\\.avi" />
     <data android:pathPattern=".*\\.mp4" />
     ....
 </intent-filter>

is there any way to make pathpattern look like * . * and match any filetype?

Ontoshgo
  • 166
  • 2
  • 9

1 Answers1

2

The scheme="data" line is in there twice.

Have you tried <data android:pathPattern=".*\\..*" /> ?

Be aware that you will accept any type of file which might not be what you really want for a lot of reasons. But any ways, that is it.

Buurman
  • 1,914
  • 17
  • 26