Android Image Picker v1.12.0 Release Notes
Release Date: 2018-01-17 // over 6 years ago-
BREAKING CHANGES!!!
[New] Return Mode API
returnMode
Define the ImagePicker return behaviour
- ReturnMode.NONE -> When image is picked, ImagePickerActivity will not dismissed even in Single Mode
- ReturnMode.ALL -> When image is picked dismiss then deliver result
- ReturnMode.CAMERA_ONLY -> When image is picked with Camera, dismiss then deliver the result
- ReturnMode.GALLERY_ONLY -> Same as CAMERA_ONLY but with Gallery
So if you want to mimic the
setReturnAfterFirst
behavior, all you have to do isImagePicker.create(activity).setReturnMode(ReturnMode.ALL).start()
setReturnAfterFirst
is now obsolete- [New] set toolbar arrow color with
toolbarArrowColor(int color)
- ๐ Rename
ImagePicker
methodsfolderTitle
->toolbarFolderTitle
imageTitle
->toolbarImageTitle
- โ Add capability to start without a request code
So instead of this
ImagePicker.cameraOnly().start(RC_CAMERA /* int */);
Now you can do this
ImagePicker.cameraOnly().start()
BUT, you have to handle the result with the helper method from
ImagePicker
@Overrideprotected void onActivityResult(int requestCode, final int resultCode, Intent data) { if (ImagePicker.shouldHandle(requestCode, resultCode, data)) { // do your things } super.onActivityResult(requestCode, resultCode, data); }
You can still use the usual result check if you define the request code by yourself.
- โ Add convenience method
ImagePicker.getFirstImageOrNull(Intent data)
to fetch only first image from the result or returnnull