A library for choose photos, videos from Android devices.
Here are some of the features of the Android Media Picker Library:
-
- Allows you to pick one or multiple photos or videos
-
- Options to crop photo.
-
- Options for pick video.
-
- Use with Activity or Fragment.
MediaOptions.Builder builders = new MediaOptions.Builder();
MediaOptions options =
builders.setIsCropped(true).setFixAspectRatio(true).setImageSize(1).build();
MediaPickerActivity.open(this, REQUEST_MEDIA, options, false);
MediaOptions.Builder builder = new MediaOptions.Builder();
MediaOptions options1 =
builder.canSelectMultiPhoto(true).setMediaListSelected(items).setImageSize(9).build();
MediaPickerActivity.open(this, REQUEST_MEDIA, options1, false);
MediaOptions.Builder builders2 = new MediaOptions.Builder();
MediaOptions options2 =
builders2.setIsCropped(true).setFixAspectRatio(true).setImageSize(1).build();
MediaPickerActivity.open(this, REQUEST_PHOTOGRAPH, options2, true);
<dependency>
<groupId>com.kevinbas</groupId>
<artifactId>android-media-picker</artifactId>
<version>1.0.1</version>
<type>pom</type>
</dependency>
compile 'com.kevinbas:android-media-picker:1.0.1'
- you must declare activity in AndroidManifest.xml
<activity
android:name="mediapicker.activities.MediaPickerActivity"
android:screenOrientation="portrait"
android:theme="@style/MediaPickerTheme"/>
- add Android M Runtime Permission
- fix Picker photo information
This project after tungdx/android-media-picker modify , add a picture of quantitative restrictions , direct camera functions Introduction
Copyright 2016 jiangTaoQuite
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.