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

What does it mean to use the photos permission instead of the photos permission? #1349

Open
kzrnm opened this issue Jul 22, 2024 · 1 comment
Labels
P2 Important issues not at the top of the work list. type: bug Something isn't working type: documentation Update to the documentation

Comments

@kzrnm
Copy link

kzrnm commented Jul 22, 2024

/// Photos can be read and added. If you only want to read them, you can
/// use the [photos] permission instead (iOS only).
///
/// Depending on the platform and version, the requirements are slightly
/// different:
///
/// **iOS:**
/// - When running Photos (iOS 14+ read & write access level)
///
/// **Android:**
/// - Devices running Android 12 (API level 32) or lower: use [Permissions.storage].
/// - Devices running Android 13 (API level 33) and above: Should use [Permissions.photos].
///
/// EXAMPLE: in Manifest:
/// <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32"/>
/// <uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
///
/// In Flutter to check the status:
///
/// if (Platform.isAndroid) {
/// final androidInfo = await DeviceInfoPlugin().androidInfo;
/// if (androidInfo.version.sdkInt <= 32) {
/// use [Permissions.storage.status]
/// } else {
/// use [Permissions.photos.status]
/// }
/// }
static const photos = Permission._(9);

I am not familiar with iOS permissions, so I cannot determine what this means. Is it mistype?

@mvanbeusekom
Copy link
Member

Hi @kzrnm,

This seems to be a mistype indeed. I will mark this issue as documentation mistake as a reminder to improve on that.

@mvanbeusekom mvanbeusekom added type: bug Something isn't working type: documentation Update to the documentation P2 Important issues not at the top of the work list. labels Jul 23, 2024
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. type: bug Something isn't working type: documentation Update to the documentation
Projects
None yet
Development

No branches or pull requests

2 participants