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] Dead-end when user selects limited permission and continues with allow none #1175

Closed
wdcs-dimilkalathiya opened this issue Aug 21, 2024 · 2 comments

Comments

@wdcs-dimilkalathiya
Copy link

wdcs-dimilkalathiya commented Aug 21, 2024

Bug description

  • On android 14 which introduces limited asset access and lets user select specific assets to limit access to all media from device if user opts for "limited access" and without selecting assets clicks on "allow none" this leads to dead-end with no option to change settings

How to reproduce
Initiate following code on any android 14 device

      final asset = await AssetPicker.pickAssets(
        context,
        pickerConfig: AssetPickerConfig(
          maxAssets: 5,
          requestType: RequestType.image,
          specialPickerType: SpecialPickerType.noPreview,
        ),
      );

Steps to reproduce the behavior:

  1. Initiate above code
  2. On first invoke it will ask for permission select "Limited access permission"
    image
  3. System pop-up will appear to select asset don't select any asset and click on "Allow none" option
    image
  4. Empty screen with no option to update permission will appear
    image

Expected behavior

  • There should be at-least option to open settings to change permission
  • If user selects new media from settings it should be updated without closing and reopening again
  • Using already available overlay for android as-well would nice
    Screenshot 2024-08-21 at 3 44 53 PM

What happens

  • Once "Allow none" option is selected user will not have any options to update permission, even after closing and re-opending screen will lead to empty and option-less screen
359823613-875929af-ca04-4be9-9ae5-8eb9e02358e2.1.mov

Version information

  • Device: Realme GT 2
  • OS: Android 14
  • Package Version: 9.2.1
  • Flutter Version: 3.22.3
@AlexV525
Copy link
Member

I got PermissionState.denied on my OnePlus 11 Android 14.

@AlexV525
Copy link
Member

Which means the error has been thrown instead of the incorrect result:

E/flutter ( 8854): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: Permission state error with PermissionState.denied.
E/flutter ( 8854): #0      AssetPickerDelegate.permissionCheck (package:wechat_assets_picker/src/delegates/asset_picker_delegate.dart:40:7)

@AlexV525 AlexV525 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 26, 2024
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