-
Notifications
You must be signed in to change notification settings - Fork 536
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
Maui Community Toolkit Camera trimming bug #9738
Comments
Can you describe more why it doesn't work? Is an exception thrown? Which method doesn't work as expected? Can you share a link to it? |
The min and max zoom report static values of 1 in release mode. In debug mode the values are different. I check that value I want to set is above min value and below max. The value reported for camera max and min is same value in release mode. In debug it shows the cameras values. In release mode it shows static default values. |
Here is link to function I am calling. https://github.com/CommunityToolkit/Maui/blob/d694f5f11d66c15718886c01d370089347822436/src/CommunityToolkit.Maui.Camera/CameraManager.android.cs on line 64 I call
Here is relevant bindings file: https://github.com/CommunityToolkit/Maui/blob/main/src/CommunityToolkit.Maui.Camera/Views/CameraView.shared.cs
|
If I remove the check for min and max zoom I can zoom in and out. I have narrowed it down to the min and max zoom are not available. It is simply reporting default values as set by my project for when they are not available. In release mode for what ever reason those values are not available when trimming is on. |
Android framework version
net9.0-android
Affected platform version
VS 2022, Dotnet Maui 9.102, CommunityTookit Camera
Description
I am trying to figure out how to fix the Maui Community toolkit Camera package. When in debug mode everything works as expected. In Release mode the Zoom in and out do not work. I have isolated it to the sample app trimming out
Xamarin.AndroidX.Camera.Core
. Adding this to sample app project fixes the bugThe
ILLink.Descriptors.xml
I would prefer to fix the trimming issue and not have to rely on having to ask consumers of a nuget package to add a TrimmerRootDescriptor xml file to csproj. I have included the build Android-arm64 linked folder as a zip file.
linked.zip
Steps to Reproduce
Did you find any workaround?
Add a ILLinkDescriptors.xml to sample app and that fixes it. Prevent
Xamarin.AndroidX.Camera.Core
from being trimmed.Relevant log output
The text was updated successfully, but these errors were encountered: