Closed m1ga closed 3 months ago
@hansemannn : I'm still testing it a bit but it will just give you:
{
cropRect: { x: 0, width: 1080, y: 0, height: 2400 },
path: 'file:///sdcard/.transforms/synthetic/picker_get_content/0/com.android.providers.media.photopicker/media/1000043692.png',
code: 0,
success: true,
x: 0,
width: 1080,
y: 0,
mediaType: 'public.image',
height: 2400
}
as a result if you set pathOnly: true
. Can be used in combination with or without allowMultiple
and maxImages
. So theoretically you can replace the external image picker module.
Also added the multi image picker to Kitchensink: https://github.com/tidev/kitchensink-v2/pull/69 to test it.
Yes, ready for review! I've tested it in an existing app without the new properties and that works as before. So no issues for existing apps and you can enable pathOnly: true
to get the new features (no blobs)
maxImages
: max amount of images to select. Use in combination withallowMultiple
pathOnly
: won't include the blob in the returned datapath
to the returned objectNote:
EXTRA_PICK_IMAGES_MAX
only works withnew Intent(MediaStore.ACTION_PICK_IMAGES)
so I have to recreategalleryIntent = new TiIntentWrapper(new Intent(MediaStore.ACTION_PICK_IMAGES));
Test:
allowMultiple
to false and testpathOnly
values