Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/androidx' into androidx
Browse files Browse the repository at this point in the history
  • Loading branch information
aaatttcccc committed Nov 3, 2024
2 parents 0dc30ec + 399eebf commit f68481f
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 33 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,21 @@ A non-X library version, no longer maintained(https://github.com/zhongjhATC/Albu

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.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:combined:1.1.100X'

// Public library, if not using the combined library above
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:common:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:common:1.1.100X'
// core lib, call display album, screen recording, recording, etc
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:multilibrary:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:multilibrary:1.1.100X'
// 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.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:progresslibrary:1.1.100X'

// use it with editing pictures
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:imageedit:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:imageedit:1.1.100X'
// 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.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:videoedit:1.1.100X'
// 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.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:videomerge:1.1.100X'
}

## snapshoot
Expand Down
14 changes: 7 additions & 7 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,21 @@

dependencies {
// 如果想简化代码并且同时用到multilibrary和progresslibrary、albumCameraRecorderCommon,可以直接使用combined库
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:combined:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:combined:1.1.100X'

// 公共库,如果不使用上面的combined库
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:common:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:common:1.1.100X'
// 核心lib,调用显示相册、录屏、录音等
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:multilibrary:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:multilibrary:1.1.100X'
// 配套使用,主要用于获取数据后进行相关显示,相应的上传进度显示,如果你只需要获取照片录像录音等数据,可以不需要使用这个
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:progresslibrary:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:progresslibrary:1.1.100X'

// 配套编辑图片使用
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:imageedit:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:imageedit:1.1.100X'
// 配套编辑视频使用,目前只有压缩功能,后续持续添加相关功能,因为该库使用了ffmpeg,占用了文件大小25M,根据实际情况选择是否使用
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:videoedit:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:videoedit:1.1.100X'
// 配套合并视频使用,因为该库使用了mp4parser,占用了文件大小约300kb,根据实际情况选择是否使用
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:videomerge:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:videomerge:1.1.100X'
}

Expand Down
14 changes: 7 additions & 7 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,21 @@ A non-X library version, no longer maintained(https://github.com/zhongjhATC/Albu

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.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:combined:1.1.100X'

// Public library, if not using the combined library above
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:common:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:common:1.1.100X'
// core lib, call display album, screen recording, recording, etc
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:multilibrary:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:multilibrary:1.1.100X'
// 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.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:progresslibrary:1.1.100X'

// use it with editing pictures
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:imageedit:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:imageedit:1.1.100X'
// 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.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:videoedit:1.1.100X'
// 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.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:videomerge:1.1.100X'
}

#### Step 3. gradle file to add configuration
Expand Down
2 changes: 2 additions & 0 deletions imageedit/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

<activity
android:name=".ImageEditActivity"
android:exported="false"
android:launchMode="singleTask"
android:screenOrientation="locked"
android:taskAffinity=""
android:theme="@style/ZImageEditTheme"
android:windowSoftInputMode="stateAlwaysHidden" />

Expand Down
16 changes: 12 additions & 4 deletions multilibrary/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,32 @@
<activity
android:name=".MainActivity"
android:configChanges="orientation|screenSize"
android:exported="false"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:screenOrientation="locked"
android:launchMode="singleTop" />
android:taskAffinity="" />
<activity
android:name=".preview.SelectedPreviewActivity"
android:configChanges="orientation|screenSize"
android:exported="false"
android:launchMode="singleTop"
android:screenOrientation="locked"
android:launchMode="singleTop" />
android:taskAffinity="" />
<activity
android:name=".preview.AlbumPreviewActivity"
android:configChanges="orientation|screenSize"
android:exported="false"
android:launchMode="singleTop"
android:screenOrientation="locked"
android:launchMode="singleTop" />
android:taskAffinity="" />
<activity
android:name=".camera.ui.previewvideo.PreviewVideoActivity"
android:configChanges="orientation|screenSize"
android:exported="false"
android:launchMode="singleTop"
android:screenOrientation="locked"
android:launchMode="singleTop" />
android:taskAffinity="" />

</application>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,10 @@ protected ArrayList<String> getNeedPermissions() {
}
}
} else {
if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED &&
ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
permissions.add(Manifest.permission.READ_EXTERNAL_STORAGE);
permissions.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ private long getMediaDuration(String filePath) {
if (metaData != null) {
duration = Long.parseLong(metaData);
}
retriever.close();
retriever.release();
return duration;
} catch (Exception exception) {
exception.printStackTrace();
Expand Down
12 changes: 6 additions & 6 deletions testmaven/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

// 公共库,如果不使用上面的combined库
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:common:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:common:1.1.100X'
// 核心lib,调用显示相册、录屏、录音等
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:multilibrary:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:multilibrary:1.1.100X'
// 配套使用,主要用于获取数据后进行相关显示,相应的上传进度显示,如果你只需要获取照片录像录音等数据,可以不需要使用这个
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:progresslibrary:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:progresslibrary:1.1.100X'

// 配套编辑图片使用
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:imageedit:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:imageedit:1.1.100X'
// 配套编辑视频使用,目前只有压缩功能,后续持续添加相关功能,因为该库使用了ffmpeg,占用了文件大小25M,根据实际情况选择是否使用
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:videoedit:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:videoedit:1.1.100X'
// 配套合并视频使用,因为该库使用了mp4parser,占用了文件大小约300kb,根据实际情况选择是否使用
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:videomerge:1.1.98X'
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:videomerge:1.1.100X'
}

0 comments on commit f68481f

Please sign in to comment.