intentfilter - Android : Intent for viewing multiple images -



intentfilter - Android : Intent for viewing multiple images -

my activity enables display gallery of images , want define "intent filter", indicating apps can open several images. example, after user takes pictures , wants browse it, chooser dialog should propose apps...

i know code, in manifest, works 1 image :

<intent-filter> <action android:name="android.intent.action.view" /> <category android:name="android.intent.category.default" /> <data android:mimetype="image/*" /> </intent-filter>

but not work several images...

i think value of mimetype not correct...but right mimetype open image of media provider ?

here illustration of intent filter view google.note :

<intent-filter android:label="@string/resolve_edit"> <action android:name="android.intent.action.view" /> <category android:name="android.intent.category.default" /> <data android:mimetype="vnd.android.cursor.item/vnd.google.note" /> </intent-filter>

i seek replace "note" "image", not work...any thought ?

i source code of gallery project, here, manifest file : http://android.git.kernel.org/?p=platform/packages/apps/gallery.git;a=blob_plain;f=androidmanifest.xml;hb=head

<intent-filter> <action android:name="android.intent.action.view"/> <category android:name="android.intent.category.default"/> <data android:mimetype="vnd.android.cursor.dir/image"/> </intent-filter>

but not work anyway on nexus s...

and found on android developper site :

for multiple records:

vnd.android.cursor.dir/vnd.yourcompanyname.contenttype

for example, request train records, next uri,

content://com.example.transportationprovider/trains

might homecoming mime type:

vnd.android.cursor.dir/vnd.example.rail

thanks lot, antoine

the default image viewer doesn't have such api exposed. , format or info differ application application. there isn't general solution work every application.

the best way, perhaps write little activity yourself, exposes intent takes in array of uris , shows thumbnails of of images.

when click on thumbnail, can launch single image intent see particular image.

here go:

<action android:name="android.intent.action.view" /> <category android:name="android.intent.category.default" /> <data android:mimetype="vnd.android.cursor.dir/image" />

got android source code. should have looked there before.

http://android.git.kernel.org/?p=platform/packages/apps/gallery3d.git;a=blob;f=androidmanifest.xml;h=889ae41342b45e5aa5784ce6a90b354ec2214849;hb=head

android intentfilter

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -