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

[BUG] Android 14 READ_MEDIA_VISUAL_USER_SELECTED BUG #1145

Closed
xuhaoyang opened this issue Jun 17, 2024 · 2 comments
Closed

[BUG] Android 14 READ_MEDIA_VISUAL_USER_SELECTED BUG #1145

xuhaoyang opened this issue Jun 17, 2024 · 2 comments

Comments

@xuhaoyang
Copy link

xuhaoyang commented Jun 17, 2024

Describe the bug
Under the conditions where both compileSdkVersion and targetSdkVersion are set to 34, and the AndroidManifest.xml is configured with READ_MEDIA_IMAGES, READ_MEDIA_VIDEO, READ_MEDIA_AUDIO, and READ_MEDIA_VISUAL_USER_SELECTED permissions.
trans: 前提条件compileSdkVersion targetSdkVersion都设置为34情况下打包,并在AndroidManifest.xml中配置了READ_MEDIA_IMAGES、READ_MEDIA_VIDEO、READ_MEDIA_AUDIO、READ_MEDIA_VISUAL_USER_SELECTED

  1. When first requesting permissions, selecting READ_MEDIA_VISUAL_USER_SELECTED, and checking some images to enter the Picker interface, there will be no prompt for restricted permissions or an option to reselect. The app needs to be restarted, or the permission state stored in memory needs to be cleared to re-prompt and provide an option.
    trans:首次申请权限,选择READ_MEDIA_VISUAL_USER_SELECTED,勾选部分图片进入Picker界面后,不会提示权限受限和提供再次勾选的入口。需要重启APP或者内存中记录的权限state销毁才能重新提示和提供入口。
  2. Based on the first situation, if you select new resources from the top "Click to set accessible resources", check and complete the selection, returning to the Picker interface will not show the newly added media.
    trans: 在基于1的情况下,从顶部的「点击设置可以访问的资源」,进行选择新的资源,勾选并完成,回到Picker界面,界面上的媒体没有新增。

How to reproduce

Steps to reproduce the behavior:

First Question

  1. touch common picker
  2. choose Select photos and videos
  3. select something and touch allow

Second Question

  1. kill app and boot it
  2. touch common picker
  3. touch accessible assets
  4. click to update accessible assets
  5. choose Select photos and videos
  6. select something and touch allow

Expected behavior

First Question

  • In this situation, entering the Picker interface should display restricted permissions, provide a prompt, and offer an option to select more.
    这种情况,进入到Picker界面应该显示权限受限,提示并提供入口可以选择更多

Second Question

  • In this situation, after selecting resources and granting permission, returning to the Picker interface should refresh to display the latest selected results.
    这种情况,应该在选择资源和允许后,返回到Picker界面,可以刷新显示最新选择的结果

I would like to know if there are any optimization plans or ideas for these two issues. Regarding the second issue, I think either manually refreshing after selecting new images from flutter_wechat_assets_picker or manually refreshing on the Android side through photo_manager and notifying via photo_manager's callback.
trans: 想了解一下,针对这两个问题,有没有优化的计划或者思路。关于第二个问题,我觉得要么从flutter_wechat_assets_picker,选择新图片后手动刷新;或者从photo_manager层面,针对Android进行手动刷新,通过photo_manager的callback告知

Screenshots (If contains)

screen-20240617-161825-zip.mp4

Version information

  • Device: Pixel etc
  • OS: Android 14
  • Package Version: 9.0.4(branch main)
  • Flutter Version: 3.16.9 - 3.22.2

Additional context
nothing

@AlexV525 AlexV525 transferred this issue from fluttercandies/flutter_wechat_assets_picker Jun 17, 2024
@AlexV525
Copy link
Member

The notification is likely an Android bug, rather than the library's. The permission overlay display of the picker has been fixed in fluttercandies/flutter_wechat_assets_picker#597.

@xuhaoyang
Copy link
Author

Thank you. I appreciate it.

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

No branches or pull requests

2 participants