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]: Permission.photos.request() didn't work at Android 13 above in Flutter 2.10.5 #1185

Closed
3 of 5 tasks
michaelsof47 opened this issue Oct 12, 2023 · 2 comments
Closed
3 of 5 tasks
Labels
P2 Important issues not at the top of the work list. platform: android Issue is related to the Android platform. status: closed (missing info) Indicates the issue was automatically closed due to a lack of information. status: needs more info We need more information before we can continue work on this issue. type: bug Something isn't working

Comments

@michaelsof47
Copy link

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS
  • Windows

Steps to reproduce

  1. Install apps
  2. Access Page
  3. Camera Permission was show. but, Read Media Permission didn't show

Expected results

Read Media Permission didn't show in Apps

Actual results

Read Media Permission had shown in Apps

Code sample

Code sample
if (await Permission.camera.request().isGranted) {
      DeviceInfoPlugin infoPlugin = DeviceInfoPlugin();
      AndroidDeviceInfo? info = await infoPlugin.androidInfo;
      if (await Permission.photos.request().isGranted &&
          info.version.sdkInt! >= 33) {
        //access file storage
      } 
      else
       //show alert based on permission storage
    } else
      await showAlertError(
          //show alert based on permission camers

Screenshots or video

Screenshots or video demonstration

[Upload media here]

Version

9.0.5 (Permission Handler) and 2.10.5 (Flutter Version)

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 2.10.5, on macOS 12.7 21G816 darwin-x64, locale en-ID)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[!] Android Studio (version 2022.3)
    ✗ Unable to find bundled Java version.
[✓] VS Code (version 1.83.0)
[✓] Connected device (1 available)
[✓] HTTP Host Availability
@JeroenWeener
Copy link
Contributor

Hi @michaelsof47, thank you for filing a bug report.

Have you tried upgrading the permission_handler to the newest version (11.0.1)? I don't think version 9.0.5 exists, are you sure that's the version you are using? Version 9 of the plugin is about as old as Android 13, so it might well be that the permissions do not work correctly yet.

@JeroenWeener JeroenWeener added platform: android Issue is related to the Android platform. status: needs more info We need more information before we can continue work on this issue. type: bug Something isn't working P2 Important issues not at the top of the work list. labels Oct 12, 2023
@github-actions
Copy link

Without additional information, we are unfortunately not able to resolve this issue. Therefore, we reluctantly closed this issue for now. If you run into this issue later, feel free to file a new issue with a reference to this issue. Add a description of detailed steps to reproduce, expected and current behaviour, logs and the output of 'flutter doctor -v'. Thanks for your contribution.

@github-actions github-actions bot added the status: closed (missing info) Indicates the issue was automatically closed due to a lack of information. label Oct 26, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Important issues not at the top of the work list. platform: android Issue is related to the Android platform. status: closed (missing info) Indicates the issue was automatically closed due to a lack of information. status: needs more info We need more information before we can continue work on this issue. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants