Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

您好,能否适配一下Android 13、Android14, 目前安卓13/14系统都无法使用,给了权限也不能扫出图片 #269

Open
AnFxy opened this issue Jan 5, 2024 · 11 comments

Comments

@AnFxy
Copy link

AnFxy commented Jan 5, 2024

您好,能否适配一下Android 13、Android14, 目前安卓13/14系统都无法使用,给了权限也不能扫出图片

@sanyuanzhang
Copy link

我手动改的源码,希望能适配一下

@tangtao646
Copy link

同问

@lOMengQu
Copy link

我手动改的源码,希望能适配一下

请教一下,要怎么改源码解决扫不出图片的问题呢

@sanyuanzhang
Copy link

我手动改的源码,希望能适配一下

请教一下,要怎么改源码解决扫不出图片的问题呢

在源码的基础上判断版本,比如:
if (Setting.isShowCamera) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
return new String[]{Manifest.permission.CAMERA,Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.READ_MEDIA_AUDIO, Manifest.permission.READ_MEDIA_VIDEO};
}
return new String[]{Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE};
} else {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
return new String[]{Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.READ_MEDIA_AUDIO, Manifest.permission.READ_MEDIA_VIDEO};
}
return new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE};
}

@isHeyiana
Copy link

我手动改的源码,希望能适配一下

请教一下,要怎么改源码解决扫不出图片的问题呢

在源码的基础上判断版本,比如: if (Setting.isShowCamera) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { return new String[]{Manifest.permission.CAMERA,Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.READ_MEDIA_AUDIO, Manifest.permission.READ_MEDIA_VIDEO}; } return new String[]{Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE}; } else { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { return new String[]{Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.READ_MEDIA_AUDIO, Manifest.permission.READ_MEDIA_VIDEO}; } return new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE}; }

把EasyPhoto升级了Android13吗,然后适配权限吗

@PupilDamon
Copy link

PupilDamon commented Mar 12, 2024 via email

@isHeyiana
Copy link

我手动改的源码,希望能适配一下

请教一下,要怎么改源码解决扫不出图片的问题呢

在源码的基础上判断版本,比如: if (Setting.isShowCamera) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { return new String[]{Manifest.permission.CAMERA,Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.READ_MEDIA_AUDIO, Manifest.permission.READ_MEDIA_VIDEO}; } return new String[]{Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE}; } else { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { return new String[]{Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.READ_MEDIA_AUDIO, Manifest.permission.READ_MEDIA_VIDEO}; } return new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE}; }

我增加了权限,小米的Android 13一样扫不出相册

@Lancerer
Copy link

Lancerer commented Apr 8, 2024

我手动改的源码,希望能适配一下

请教一下,要怎么改源码解决扫不出图片的问题呢

在源码的基础上判断版本,比如: if (Setting.isShowCamera) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { return new String[]{Manifest.permission.CAMERA,Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.READ_MEDIA_AUDIO, Manifest.permission.READ_MEDIA_VIDEO}; } return new String[]{Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE}; } else { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { return new String[]{Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.READ_MEDIA_AUDIO, Manifest.permission.READ_MEDIA_VIDEO}; } return new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE}; }

我增加了权限,小米的Android 13一样扫不出相册

参考 #249 将项目fork后修改源码然后jitpack发布

@PupilDamon
Copy link

PupilDamon commented Apr 8, 2024 via email

@wzgl5533
Copy link

这个只适配到33吧,34呢

@lhw88860979
Copy link

AlbumModel 中的query权限直接去掉
checkAndRequestPermissionsInActivity 全部返回true
自己在外面请求权限判断

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants