CommunityToolkit
CommunityToolkit copied to clipboard
Note error
Type of issue
Other (describe below)
Description
The note that says "This will not change the resolution displayed in the preview from the camera.", is incorrect, since in Samsung Flip 5 (SM-F31B) with Android 14 and Samsung S24 Ultra (SM-928B) with Android 14, the cameraPreview resolution is modified by modifying the resolution from MyCamera.SelectedCamera.SupportedResolutions
Page URL
https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/views/camera-view?tabs=android
Content source URL
https://github.com/MicrosoftDocs/CommunityToolkit/blob/main/docs/maui/views/camera-view.md
Document Version Independent Id
ddd38b0d-10d0-a000-b6aa-2769c945c4fd
Article author
@bijington
Metadata
- ID: ddd38b0d-10d0-a000-b6aa-2769c945c4fd
- Service: dotnet-communitytoolkit
- Sub-service: dotnet-maui-community-toolkit
Thanks for the report. To confirm are you setting the ImageCaptureResolution property to a value in the SupporterResolutions property?
Thanks for the report. To confirm are you setting the
ImageCaptureResolutionproperty to a value in theSupporterResolutionsproperty?
Yes, for exsample:
private void SetPhotoResolution()
{
var MaxResolutionSize = MyCamera.SelectedCamera.SupportedResolutions.OrderByDescending(r => r.Width * r.Height).DefaultIfEmpty();
MyCamera.ImageCaptureResolution = MaxResolutionSize.First();
}
On Motorola works fine