All Projects → zhongjhATC → Albumcamerarecorder

zhongjhATC / Albumcamerarecorder

Licence: mit
一个高效的多媒体支持操作库,可多方面的简单配置操作相册、拍照、录制、录音等功能。也支持配套使用的展示图片、视频、音频的九宫格功能。 (An efficient multimedia support operation library, can be a variety of simple configuration operation album, photo, recording, recording and other functions.Also support supporting the use of the display of pictures, video, audio of the nine grid function.)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Albumcamerarecorder

Android Camera2 Secret Picture Taker
Take pictures 📷 secretly (without preview or launching device's camera app) using Android CAMERA2 API
Stars: ✭ 275 (+159.43%)
Mutual labels:  camera, picture, capture, preview
Trinity
android video record editor muxer sdk
Stars: ✭ 609 (+474.53%)
Mutual labels:  recorder, camera, editor
Screenity
The most powerful screen recorder & annotation tool for Chrome 🎥
Stars: ✭ 6,229 (+5776.42%)
Mutual labels:  recorder, camera, editor
Album
android 图片视频加载库,单选,多选,预览,自定义UI,相机,裁剪...等等 已适配android10,11
Stars: ✭ 53 (-50%)
Mutual labels:  camera, picture, album
Ypimagepicker
📸 Instagram-like image picker & filters for iOS
Stars: ✭ 3,661 (+3353.77%)
Mutual labels:  camera, picture
Magicalcamera
A library to take picture easy, transform your data in different format and save photos in your device
Stars: ✭ 327 (+208.49%)
Mutual labels:  camera, picture
Cameraview
📸 A well documented, high-level Android interface that makes capturing pictures and videos easy, addressing all of the common issues and needs. Real-time filters, gestures, watermarks, frame processing, RAW, output of any size.
Stars: ✭ 4,137 (+3802.83%)
Mutual labels:  camera, picture
ionic-multi-camera
Take multiple photos one after another
Stars: ✭ 12 (-88.68%)
Mutual labels:  camera, picture
Flipsidecamera
The camera app that takes pictures from both sides of your world ! 📷
Stars: ✭ 535 (+404.72%)
Mutual labels:  camera, picture
Cameraengine
🐒📷 Camera engine for iOS, written in Swift, above AVFoundation. 🐒
Stars: ✭ 554 (+422.64%)
Mutual labels:  camera, capture
Vuep
🎡 A component for rendering Vue components with live editor and preview.
Stars: ✭ 840 (+692.45%)
Mutual labels:  editor, preview
Anyimagekit
A toolbox for pick/edit/capture photo or video. Written in Swift.
Stars: ✭ 324 (+205.66%)
Mutual labels:  capture, editor
Openglcamera2
Android OpenGL Camera 2.0 实现 30 种滤镜和抖音特效
Stars: ✭ 305 (+187.74%)
Mutual labels:  capture, preview
Android Hidden Camera
This library is to take picture using camera without camera preview.
Stars: ✭ 339 (+219.81%)
Mutual labels:  camera, picture
Tysnapshotscroll
一句代码保存截图,将 UIScrollView UITableView UICollectionView UIWebView WKWebView 网页 保存 为 长图 查看。Save the scroll view page as an image,support UIScrollView,UITableView,UICollectionView,UIWebView,WKWebView.(Support iOS13)
Stars: ✭ 709 (+568.87%)
Mutual labels:  picture, capture
Vue Picture Input
Mobile-friendly picture file input Vue.js component with image preview, drag and drop, EXIF orientation, and more
Stars: ✭ 862 (+713.21%)
Mutual labels:  picture, preview
Kodeweave
HTML/CSS/JS and Markdown Playground For Web Designers and Developers
Stars: ✭ 87 (-17.92%)
Mutual labels:  editor, preview
ImageAttachment
Example App to show how to pick an image from Camera/Gallery
Stars: ✭ 23 (-78.3%)
Mutual labels:  camera, capture
Weibo Picture Store
🖼 新浪微博图床 Chrome/Firefox 扩展,支持同步到微相册
Stars: ✭ 624 (+488.68%)
Mutual labels:  picture, album
Xamlviewer
XAML Viewer is a lightweight XAML editor.
Stars: ✭ 87 (-17.92%)
Mutual labels:  editor, preview

AlbumCameraRecorderX

MinSdk License

该版本是基于AndroidX版本开发的分支。版本号后面带着X的都是属于基于AndroidX版本开发。

目前已经投入到正式项目中使用。

有任何建议或者想添加的功能,都可提在Issues

中文

一个高效的多媒体支持操作库,可多方面的简单配置操作拍照、相册、录制、录音等功能。

也支持配套使用的展示图片、视频、音频的九宫格功能。

本开源库的部分代码来自Matisse.

非常感谢知乎提供的这么棒的开源项目!

非X版本分支

非X库版本,已经停止维护(https://github.com/zhongjhATC/AlbumCameraRecorder/tree/master)

特性

  • 支持自定义样式.支持更换里面的相关按钮.
  • 支持相册、录制、录音等三合一功能(类似抖音等),并且也可以通过配置只独立出其中一个功能.
  • 虽然功能很多,但是可以按照所需功能来引入某些库
  • 丰富的回调接口和调试信息,可利用现有API实现丰富的效果.
  • 兼容性强,不管是低版本的4.1还是目前最新版本的Android 11,都进行了相关兼容处理
  • 支持所有图片读取处理自定义,例如可自定义glide、Fresco等等都可以
  • 支持从相册选择图片
  • 支持相册按照手机文件区分不同的文件夹选择
  • 自定义性强,支持各种自定义最多选多少张图片、视频等等,也支持只显示自定义文件大小
  • 支持自定义相册的样式,颜色,大小等等
  • 录制拍照时支持闪光灯、前后摄像头切换
  • 录制拍照时支持双指触摸放大缩小,支持单指上下滑动控制亮度
  • 录制拍照长按按钮等所有UI可自定义,全是svg图片可以很好的处理动画细节
  • 录制支持分段录制,以后还会加入视频编辑
  • 图片编辑支持颜色涂鸦、输入文字、马赛克处理、旋转、裁剪等处理
  • 支持录音处理
  • 所有录制拍照都经过了压缩处理
  • 1.0.19X以后的版本兼容Android Q版本,如果打算保留自己项目sdk28的,可以只保留1.0.18X

引入

Step 1. Add the JitPack repository to your build file

allprojects {
	repositories {
		...
		maven { url 'https://www.jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
     implementation 'com.github.zhongjhATC.AlbumCameraRecorder:albumCameraRecorderCommon:1.0.27X'        // 公共库,必须使用此库
     implementation 'com.github.zhongjhATC.AlbumCameraRecorder:multilibrary:1.0.27X'      // 核心lib,调用显示相册、录屏、录音等
     implementation 'com.github.zhongjhATC.AlbumCameraRecorder:progresslibrary:1.0.27X' // 配套使用,主要用于获取数据后进行相关显示,相应的上传进度显示,如果你只需要获取照片录像录音等数据,自行写获取后呈现方式,可以不需要是用这个
     implementation 'com.github.zhongjhATC.AlbumCameraRecorder:imageedit:1.0.27X'  // 配套编辑图片使用
     implementation 'com.github.zhongjhATC.AlbumCameraRecorder:videoedit:1.0.27X'  // 配套编辑视频使用
}

快照

市场上常用手机兼容测试

100%通过兼容测试报告.

使用

启动多媒体相关功能

    // 拍摄有关设置
    CameraSetting cameraSetting = new CameraSetting();
    cameraSetting.mimeTypeSet(MimeType.ofAll());// 支持的类型:图片,视频

    // 相册
    AlbumSetting albumSetting = new AlbumSetting(true)
            .mimeTypeSet(MimeType.ofAll())// 支持的类型:图片,视频
            .countable(true)// 是否显示多选图片的数字
            .addFilter(new GifSizeFilter(320, 320, 5 * Filter.K * Filter.K))// 自定义过滤器
            .originalEnable(true)// 开启原图
            .maxOriginalSize(10); // 最大原图size,仅当originalEnable为true的时候才有效

    // 录音机
    RecorderSetting recorderSetting = new RecorderSetting();

    // 全局
    GlobalSetting globalSetting = MultiMediaSetting.from(MainSimpleActivity.this).choose(MimeType.ofAll());

    if (mBinding.cbAlbum.isChecked())
        // 开启相册功能
        globalSetting.albumSetting(albumSetting);
    if (mBinding.cbCamera.isChecked())
        // 开启拍摄功能
        globalSetting.cameraSetting(cameraSetting);
    if (mBinding.cbRecorder.isChecked())
        // 开启录音功能
        globalSetting.recorderSetting(recorderSetting);

    globalSetting
            .setOnMainListener(errorMessage -> Toast.makeText(MainSimpleActivity.this.getApplicationContext(), "自定义失败信息:录音已经达到上限", Toast.LENGTH_LONG).show())
            .allStrategy(new SaveStrategy(true, "com.zhongjh.cameraapp.fileprovider", "AA/test"))// 设置路径和7.0保护路径等等
            .imageEngine(new Glide4Engine())    // for glide-V4
            .maxSelectablePerMediaType(5 - alreadyImageCount, 1 - alreadyVideoCount, 1 - alreadyAudioCount)// 最大10张图片或者最大1个视频
            .forResult(REQUEST_CODE_CHOOSE);

获取相关返回的数据

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (resultCode != RESULT_OK)
        return;
    switch (requestCode) {
        case REQUEST_CODE_PREVIEW:
            ```
        case REQUEST_CODE_CHOOSE:
            // 获取类型,根据类型设置不同的事情
            switch (MultiMediaSetting.obtainMultimediaType(data)) {
                case MultimediaTypes.PICTURE:
                    // 图片
                    List<String> path = MultiMediaSetting.obtainPathResult(data);
                    mBinding.mplImageList.addImagesStartUpload(path);
                    break;
                case MultimediaTypes.VIDEO:
                    // 录像
                    List<String> videoPath = MultiMediaSetting.obtainPathResult(data);
                    mBinding.mplImageList.addVideoStartUpload(videoPath);
                    break;
                case MultimediaTypes.AUDIO:
                    // 语音
                    RecordingItem recordingItem = MultiMediaSetting.obtainRecordingItemResult(data);
                    mBinding.mplImageList.addAudioStartUpload(recordingItem.getFilePath(), recordingItem.getLength());
                    break;
                case MultimediaTypes.BLEND:
                    // 混合类型,意思是图片可能跟录像在一起.
                    mBinding.mplImageList.addImagesStartUpload(MultiMediaSetting.obtainPathResult(data));
                    break;
            }
            break;
    }
}

如果你需要用到九宫格展览数据,具体可以看相关代码.

相关API,更多API和支持持续丰富加入

如果你使用展示的九宫库,那么下面这些api对你也有用

历史更新

从1.0.1版本开始总结的历史更新.

apk直接体验下载

写在最后

  1. 觉得好用的欢迎给个Star(GitHub

  2. 发现任何BUG欢迎留言或者留个Issues(Issues

  3. 任何转载请注明出处

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].