That's right but now the choice of your application is showing when
you open anything, isn't it ?
You should be a bit more specific, try to get the mime type of the
intent you receive when opening that specific directory you want to
handle.

On 14 août, 17:19, Anthony Xu <[email protected]> wrote:
> Thanks for your reply, Nivek.
>
> What you said is right, after doing some tests, just show my
> experiences as below:
> 1.
>         <activity android:name=".MyActivity" android:label="@string/
> app_name"
>             android:multiprocess="true"
> android:excludeFromRecents="true">
>             <intent-filter>
>                 <action android:name="android.intent.action.VIEW" />
>                 <category
> android:name="android.intent.category.DEFAULT" />
>                 <data android:mimeType="image/*" />
>             </intent-filter>
>         </activity>
> It will only work for the image file.
>
> 2.
>         <activity android:name=".MyActivity" android:label="@string/
> app_name"
>             android:multiprocess="true"
> android:excludeFromRecents="true">
>             <intent-filter>
>                 <action android:name="android.intent.action.VIEW" />
>                 <category
> android:name="android.intent.category.DEFAULT" />
>                 <data android:mimeType="*/*" />
>             </intent-filter>
>         </activity>
> It will work for all including the media directory, which is what I
> want.
>
> Thank you again, Nivek.
>
> On Aug 14, 5:59 pm, Nivek <[email protected]> wrote:
>
> > Hi,
>
> > Your intent filter should look like this :
> >  <intent-filter android:icon="@drawable/icon" android:label="@string/
> > intent_open_image">
> >        <action android:name="android.intent.action.VIEW"></action>
> >        <category android:name="android.intent.category.DEFAULT"></
> > category>
> >        <data android:mimeType="image/*"></data>
> >  </intent-filter>
>
> > Don't forget to include the mime type with the <data> element. Your
> > <type> element does not 
> > exist.http://developer.android.com/intl/fr/guide/topics/manifest/data-eleme...
>
> > Nivek
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to