AlbumCameraRecorder
1.1.80X
有效的多媒体支持操作库可以是各种简单的配置操作照片,相册,录制,录制和其他功能。
还支持支持显示图片,视频,音频9网格功能的使用。
一个非X库版本,不再维护(https://github.com/zhongjhatc/albumcamerarecorder/tree/master)
allprojects {
repositories {
...
maven { url 'https://www.jitpack.io' }
}
}
dependencies {
// if you want to simplify the code and at the same time use multilibrary and progresslibrary, albumCameraRecorderCommon, can directly use the combined library
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:combined:1.1.104X'
// Public library, if not using the combined library above
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:common:1.1.104X'
// core lib, call display album, screen recording, recording, etc
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:multilibrary:1.1.104X'
// It is mainly used to display the relevant upload progress after obtaining data. If you only need to obtain photos, videos and recordings, you don't need to use this
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:progresslibrary:1.1.104X'
// use it with editing pictures
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:imageedit:1.1.104X'
// Supporting editing video use, currently only compression function, continue to add related functions, because the library uses ffmpeg, occupies a file size of 25M, according to the actual situation to choose whether to use
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:videoedit:1.1.104X'
// Because the library uses mp4parser, which takes up a file size of about 300kb, choose whether to use it according to the actual situation
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:videomerge:1.1.104X'
}




100%通过稳定性测试报告。
// Shooting Related Settings
CameraSetting cameraSetting = new CameraSetting();
// Types supported: picture, video
cameraSetting.mimeTypeSet(MimeType.ofAll());
// album
mAlbumSetting = new AlbumSetting(false)
// Types supported: picture, video
.mimeTypeSet(MimeType.ofAll())
// Whether to display the number of multiple selected images
.countable(true)
// Custom filter
.addFilter(new GifSizeFilter(320, 320, 5 * BaseFilter.K * BaseFilter.K))
// Open the original
.originalEnable(true)
// Maximum original size, valid only if originalEnable is true
.maxOriginalSize(10);
// recorder
RecorderSetting recorderSetting = new RecorderSetting();
// globalSetting
GlobalSetting globalSetting = MultiMediaSetting.from(MainActivity.this).choose(MimeType.ofAll());
globalSetting.cameraSetting(cameraSetting);
globalSetting.albumSetting(albumSetting);
globalSetting.recorderSetting(recorderSetting);
mGlobalSetting
.setOnMainListener(errorMessage -> {
Log.d(TAG, errorMessage);
Toast.makeText(MainSimpleActivity.this.getApplicationContext(), errorMessage, Toast.LENGTH_LONG).show();
})
// Set paths and 7.0 protection paths, and so on
.allStrategy(new SaveStrategy(true, "com.zhongjh.cameraapp.fileprovider", "aabb"))
// for glide-V4
.imageEngine(new Glide4Engine())
// Maximum 5 images or maximum 3 video
.maxSelectablePerMediaType(null,
5,
3,
3,
alreadyImageCount,
alreadyVideoCount,
alreadyAudioCount)
.forResult(REQUEST_CODE_CHOOSE);
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode != RESULT_OK)
return;
List<LocalFile> result = MultiMediaSetting.obtainLocalFileResult(data);
}
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths_public" />
</provider>
请参阅演示以获取简单的扩展。如果您需要更深入地了解有关扩展的更多信息,请简单的摄像机范围架构
因为[cameraview](https://github.com/natario1/cameraview)的相机内部,因此,请更改分辨率,当磁带录制和其他功能可以访问以查看更多接口时,请关闭,因此我们如何从库中获取cameraveiew,我们可以在我们的demo实例中使用该插图
如果您使用显示的库,则以下API也对您有用
历史更新。
如果您认为它有效,请给我一颗星(Github)
如果您发现任何错误,请发表评论或留下问题(问题)
任何重印