[image_picker] Updated docs getImage() about preference rear front not working on Android #3037
Conversation
…oid's impossibility to specify camera
Co-authored-by: Maurits van Beusekom <maurits@vnbskm.nl>
Co-authored-by: Maurits van Beusekom <maurits@vnbskm.nl>
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
@googlebot I fixed it. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % the versioning and some nits on the documentation.
@@ -2,7 +2,7 @@ name: image_picker | |||
description: Flutter plugin for selecting images from the Android and iOS image | |||
library, and taking new pictures with the camera. | |||
homepage: https://github.com/flutter/plugins/tree/master/packages/image_picker/image_picker | |||
version: 0.6.7+7 | |||
version: 0.6.8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it is just a documentation update, we should only update the patch version, so 0.6.7+8
https://dart.dev/tools/pub/versioning#semantic-versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed version number to 0.6.7+8 (missed the part which explained the semantic versioning prior version 1.0.0).
@@ -87,7 +87,8 @@ class ImagePicker { | |||
/// | |||
/// Use `preferredCameraDevice` to specify the camera to use when the `source` is [ImageSource.camera]. | |||
/// The `preferredCameraDevice` is ignored when `source` is [ImageSource.gallery]. It is also ignored if the chosen camera is not supported on the device. | |||
/// Defaults to [CameraDevice.rear]. | |||
/// Defaults to [CameraDevice.rear]. Since Android has no documented parameter for an intent to specify if the front or rear camera should be opened, this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the Since Android..
part should be a new line. Ditto below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, I updated the documentation to (also in the image_picker_platform_interface):
/// Defaults to [CameraDevice.rear].
///
/// Note that Android has no documented parameter for an intent to specify if
/// the front or rear camera should be opened, this function is not guaranteed
/// to work on an Android device.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to bump the version for the platform_interface plugin as well
@@ -1,3 +1,7 @@ | |||
## 0.6.8 | |||
|
|||
* Update documentation of getImage() about Android's disability to preference front/rear camera |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits:
* Update documentation of getImage() about Android's disability to preference front/rear camera | |
* Update documentation of getImage() about Android's disability to preference front/rear camera. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the extra period.
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! CI seems unhappy with formatting.
@@ -132,7 +132,11 @@ abstract class ImagePickerPlatform extends PlatformInterface { | |||
/// | |||
/// Use `preferredCameraDevice` to specify the camera to use when the `source` is [ImageSource.camera]. | |||
/// The `preferredCameraDevice` is ignored when `source` is [ImageSource.gallery]. It is also ignored if the chosen camera is not supported on the device. | |||
/// Defaults to [CameraDevice.rear]. | |||
/// Defaults to [CameraDevice.rear]. | |||
/// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I think you were right. It was related to the comment above. Whatever you did was correct. My mistake :) Can we revert this change? Sorry for the confusion.
Same above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, will revert back
@googlebot I consent. |
1 similar comment
@googlebot I consent. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…t working on Android (flutter#3037)
…t working on Android (flutter#3037)
…t working on Android (flutter#3037)
Description
Updated the documentation of getImage() in image_picker.dart and image_picker_platform.dart about Android's disability to preference front/rear camera, because this wasn't specified and caused confusion for people wondering why it didn't work.
Related Issues
Issue 55644
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?