HuanTanSheng / EasyPhotos

兼容android11、android 10,相机拍照,相册选择(单选/多选),文件夹图片选择(单选/多选),视频选择,视频图片多类型复杂选择,各界面根据状态栏颜色智能适配状态栏字体颜色变色为深色或浅色,根据使用场景智能适配沉浸式状态栏,内部处理运行时权限,支持Glide/Picasso/Imageloader等所有图片加载框架库的带默认勾选选中图片的能填充自定义广告的自定义Ui相机相册图片浏览选择器;更有拼图/文字贴纸/贴图/图片缩放/Bitmap图片添加水印/媒体文件更新到媒体库等众多Bitmap图片编辑功能的android Bitmap图片处理工具框架库。
3k stars 504 forks source link

希望适配Android13 #249

Open gaoluhan opened 1 year ago

Glorylan commented 1 year ago

确实得适配android13,别告诉我到这就终止了吧 - -!

PupilDamon commented 1 year ago

您好,钟裕达已经收到您的来信并会尽快查收,谢谢!

dailystudio commented 1 year ago

@Glorylan 如果你的问题是,targetSdk = 33,会导致打开相册失败,提示没有符合条件的图片。你可以自己在应用里加上:

<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />

然后再打开调用EasyPhoto的API之前,找一个合适的点在request一下这个permission就可以了。

wxiaofan commented 1 year ago

1.新增权限: `

<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />`

2.修改EasyPhotosActivity::getNeedPermissions 方法 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { return new String[]{ Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.READ_MEDIA_AUDIO, Manifest.permission.READ_MEDIA_VIDEO }; } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { return new String[]{ Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE }; } return new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}; 3.修改AlbumModel::query if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { if (PermissionChecker.checkSelfPermission(context, Manifest.permission.READ_MEDIA_IMAGES) != PermissionChecker.PERMISSION_GRANTED) { if (null != callBack) callBack.onAlbumWorkedCallBack(); return; } } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { if (PermissionChecker.checkSelfPermission(context, Manifest.permission.READ_EXTERNAL_STORAGE) != PermissionChecker.PERMISSION_GRANTED) { if (null != callBack) callBack.onAlbumWorkedCallBack(); return; } } 完美解决

rome753 commented 1 year ago

1.新增权限<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" /> <uses-permission android:name="android.permission.READ_MEDIA_AUDIO" /> <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" /> 2.修改EasyPhotosActivity::getNeedPermissions 方法 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { return new String[]{ Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.READ_MEDIA_AUDIO, Manifest.permission.READ_MEDIA_VIDEO }; } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { return new String[]{ Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE }; } return new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}; 3.修改AlbumModel::query if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { if (PermissionChecker.checkSelfPermission(context, Manifest.permission.READ_MEDIA_IMAGES) != PermissionChecker.PERMISSION_GRANTED) { if (null != callBack) callBack.onAlbumWorkedCallBack(); return; } } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { if (PermissionChecker.checkSelfPermission(context, Manifest.permission.READ_EXTERNAL_STORAGE) != PermissionChecker.PERMISSION_GRANTED) { if (null != callBack) callBack.onAlbumWorkedCallBack(); return; } } 完美解决

不是Q,是TIRAMISU

PupilDamon commented 1 year ago

您好,钟裕达已经收到您的来信并会尽快查收,谢谢!