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] audio permission issue #516

Closed
jihanga opened this issue Nov 28, 2023 · 4 comments · Fixed by #517
Closed

[BUG] audio permission issue #516

jihanga opened this issue Nov 28, 2023 · 4 comments · Fixed by #517
Labels
await test The issue/PR is waiting for further tests. p: Android This issue only happens on Android platform. r: photo_manager Related to the photo_manager package. s: bug Something isn't working. ⏳WEEK This issue is scheduled to be solved within one week.

Comments

@jihanga
Copy link

jihanga commented Nov 28, 2023

Describe the bug

First of all, this is a problem with Android.
(iOS is heavily restricted from importing audio.)

I'm allowing all the choices of images/video/audio using the wechat asset picker.
But if you only need audio

AssetPickerConfig(
requestType: RequestType.audio,
)

Only audio can be selected using the ,
In other cases, RequestType.common allows you to select images and videos.

The problem here is that even if I only allowed RequestType.audio, I only request permission to the media,
This means that permissions for audio are not requested.
So I had to do additional work to request audio permissions, and the library didn't run unless the library allowed permissions to the media, even though only audio permissions were required.

It seems strange that you need permission to take pictures and videos, even though only audio is available for selection.

How to reproduce

Steps to reproduce the behavior:

AssetPicker.pickAssets(
        context,
        pickerConfig: AssetPickerConfig(
          requestType: RequestType.aduio,
          limitedPermissionOverlayPredicate: (state) => false,
        ),
      );

When this code is enabled, it checks only permissions for photos and videos without asking permissions for audio.
Even if you allow permission for photos and videos, you don't have permission for audio, so you can't see anything in the actual item.

Expected behavior

There seems to be a need for an option that allows users to check authority directly without checking authority at all using request.type

Screenshots (If contains)

Version information

  • OS: android only
@jihanga jihanga added the await investigate The issue is waiting for further investigation. label Nov 28, 2023
@jihanga
Copy link
Author

jihanga commented Nov 29, 2023

https://github.com/fluttercandies/flutter_wechat_assets_picker/blob/main/README.md#permissions

I'm aware of that.
However, I used wechat_asset_picker to implement the image selection part and audio selection part separately.
Therefore, if you choose audio, I hope you don't get image permission.

However, in the current case, you will be asked for image permission even if you only try to select audio.

@AlexV525
Copy link
Member

Please verify if the linked PR resolves the problem.

@jihanga
Copy link
Author

jihanga commented Nov 29, 2023

Your PR was the function I wanted.
I didn't think it would be revised so quickly. Thank you for your quick response.

@AlexV525 AlexV525 added s: bug Something isn't working. r: photo_manager Related to the photo_manager package. p: Android This issue only happens on Android platform. await test The issue/PR is waiting for further tests. ⏳WEEK This issue is scheduled to be solved within one week. and removed await investigate The issue is waiting for further investigation. labels Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
await test The issue/PR is waiting for further tests. p: Android This issue only happens on Android platform. r: photo_manager Related to the photo_manager package. s: bug Something isn't working. ⏳WEEK This issue is scheduled to be solved within one week.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants