Image Picker Library for Android
Simple Library to Pick an image from the Gallery or Capture image with Camera.
Almost 90% of the app that I have developed has Image upload feature. To simplify the image pick/capture option I have created this library. Its easily configurable and easy to use.
?Usage
-
Include the library as local library project.
-
The ImagePicker configuration is created using the builder pattern.
-
Override
onActivityResult
method and handle ImagePicker result.
?Customization
-
Pick image using Gallery
-
Capture image using Camera
-
Crop image
-
Crop square image(e.g for profile)
-
Compress image size(e.g image should be maximum 1 MB)
-
Set Resize image resolution
-
You can also specify the request code with ImagePicker
-
Add Following parameters in your colors.xml file, If you want to customize uCrop Activity.
-
You don't need to add any permissions to manifest, everything is merged automatically from library's manifest file. You can remove unnecessary permission by adding tools:node="remove tag.
?Compatibility
- Library - Android Kitkat 4.4+ (API 19)
- Sample - Android Lollipop 5.0+ (API 21)