Discussion:
Photo ACTION_PICK intent returning data not set in setType
Gyan
2009-10-23 07:08:39 UTC
Permalink
Hey All,

I'm using the setType to return me images mentioned only of the specific
type.

Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.setType("image/gif");
photoPickerIntent.setType("image/jpeg");
photoPickerIntent.setType("image/tiff");
photoPickerIntent.setType("image/png");
photoPickerIntent.setType("image/bmp");

startActivityForResult(photoPickerIntent, RESULT_IMAGE_RETURNED);



But this piece of code returns me images of other types too... say ".wbmp"
Is there any other way to exclude the unwanted results from the Intent.

Thanks in advance !!!

Gyan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---
Miguel Paraz
2009-10-23 08:42:36 UTC
Permalink
Hi,
Post by Gyan
I'm using the setType to return me images mentioned only of the specific
type.
        Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
        photoPickerIntent.setType("image/gif");
        photoPickerIntent.setType("image/jpeg");
        photoPickerIntent.setType("image/tiff");
        photoPickerIntent.setType("image/png");
        photoPickerIntent.setType("image/bmp");
only the last setType() is used, they don't add up.
Post by Gyan
        startActivityForResult(photoPickerIntent, RESULT_IMAGE_RETURNED);
But this piece of code returns me images of other types too... say ".wbmp"
Is there any other way to exclude the unwanted results from the Intent.
The Camera app, which provides the Gallery, doesn't seem to support
the type from the Intent. I think this behavior isn't guaranteed.
Gyan
2009-10-23 09:24:09 UTC
Permalink
Thanks much that was very precise!
Post by Miguel Paraz
Hi,
Post by Gyan
I'm using the setType to return me images mentioned only of the specific
type.
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.setType("image/gif");
photoPickerIntent.setType("image/jpeg");
photoPickerIntent.setType("image/tiff");
photoPickerIntent.setType("image/png");
photoPickerIntent.setType("image/bmp");
only the last setType() is used, they don't add up.
Post by Gyan
startActivityForResult(photoPickerIntent, RESULT_IMAGE_RETURNED);
But this piece of code returns me images of other types too... say
".wbmp"
Post by Gyan
Is there any other way to exclude the unwanted results from the Intent.
The Camera app, which provides the Gallery, doesn't seem to support
the type from the Intent. I think this behavior isn't guaranteed.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Loading...