BarcodeScanning.Native.Maui icon indicating copy to clipboard operation
BarcodeScanning.Native.Maui copied to clipboard

RequestZoomFactor does not work in Release-Mode

Open markusroessler opened this issue 3 months ago • 2 comments

Platform: Android the RequestZoomFactor property does nothing in Release-Mode. This caused by https://github.com/dotnet/android/issues/9738 The check if (value is IZoomState zoomState) in CameraStateObserver never passes because the type AndroidX.Camera.Core.Internal.ImmutableZoomState is removed during trimming (for whatever reason). Could you please add the following to the csproj until the trimming bug is fixed? This disables trimming for Xamarin.AndroidX.Camera.Core.

<ItemGroup>
	<TrimmerRootAssembly Include="Xamarin.AndroidX.Camera.Core" RootMode="All" />
</ItemGroup>

you can also verify this in debug mode using the following properties

<PublishTrimmed>true</PublishTrimmed>
 <RunAOTCompilation>true</RunAOTCompilation>
 <TrimMode>partial</TrimMode>
<IsAotCompatible>true</IsAotCompatible>
<UseInterpreter>false</UseInterpreter>
	<_MauiForceXamlCForDebug>true</_MauiForceXamlCForDebug>

markusroessler avatar Oct 08 '25 18:10 markusroessler