I see. Something as simple as <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="file" /> <data android:mimeType="*/*" /> <data android:pathPattern=".*epub" /> </intent-filter> would catch all file downloads from browser. I'll dig more into this. The only thing I can suggest so far is: 1) have a wildcard intent filter to catch all files 2) check the file extension in onCreate(), onNewIntent(). if matches, handle it, pass the received intent with startNextMatchingActivity() otherwise. This is ugly but at least will work.
On Jul 24, 8:29 am, Dmitry Manayev <dmitry.mana...@gmail.com> wrote: > Thanks. > Alex, .exe is registered in android mimeTypes,so if you specify "*/*" > it would be founded with all other types.But .my_type isn't registered > in Android.So it wouldn't help.I think now your application could open > diferent types of files. > > On 23 июл, 14:42, alex <gsm...@gmail.com> wrote: > > > I had to specify android:mimeType="*/*". Here's an example: > > -- > > <activity android:name=".activity.Activity"> > > <intent-filter> > > <action > > android:name="android.intent.action.VIEW" /> > > <category > > android:name="android.intent.category.DEFAULT" /> > > <category > > android:name="android.intent.category.BROWSABLE" /> > > <dataandroid:scheme="http" /> > > <dataandroid:scheme="https" /> > > <dataandroid:scheme="ftp" /> > > <data android:host="*" /> > > <data android:mimeType="*/*" /> > > <data android:pathPattern=".*\\.exe" /> > > </intent-filter> > > </activity> > > -- > > > On Jul 20, 4:37 pm, Dmitry Manayev <dmitry.mana...@gmail.com> wrote: > > > > Hi! > > > > I have problem with adding a new file type to android(the file type > > > is .comap).I need to run my application with this file from android > > > browser and from file manager. > > > I know that I need to write a special <intent-filter> for that,but I > > > don't know how,because this format hasn't any special,registered MIME > > > type. > > > I tried to write in AndroidManifest.xml to open a file test.comap: > > > <intent-filter> > > > <action > > > android:value="android.intent.action.VIEW" /> > > > <category > > > android:value="android.intent.category.DEFAULT" /> > > > <dataandroid:scheme="file" > > > android:host="*" android:path="sdcard/test.comap" /> > > > </intent-filter> > > > But this doesn't work. > > > How to do it right? > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---