From 910e35d0d182816b4dd25b941711540a1168c27a Mon Sep 17 00:00:00 2001 From: cwalker Date: Mon, 19 Sep 2022 17:08:25 -0400 Subject: [PATCH 1/4] Fix needed to rotate device to landscape to scan 1D barcodes --- ZXing.Net.MAUI/Platforms/Android/CameraManager.android.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ZXing.Net.MAUI/Platforms/Android/CameraManager.android.cs b/ZXing.Net.MAUI/Platforms/Android/CameraManager.android.cs index fe9f5b6..bcd85ca 100644 --- a/ZXing.Net.MAUI/Platforms/Android/CameraManager.android.cs +++ b/ZXing.Net.MAUI/Platforms/Android/CameraManager.android.cs @@ -63,6 +63,7 @@ public void Connect() // Frame by frame analyze imageAnalyzer = new ImageAnalysis.Builder() .SetDefaultResolution(new Android.Util.Size(640, 480)) + .SetOutputImageRotationEnabled(true) .SetBackpressureStrategy(ImageAnalysis.StrategyKeepOnlyLatest) .Build(); From cc715e56181907ec305ea1cc6503450faf9e843e Mon Sep 17 00:00:00 2001 From: cwalker Date: Fri, 23 Sep 2022 12:12:43 -0400 Subject: [PATCH 2/4] Implement AutoFocus via Timer, and tap to focus --- BigIslandBarcode/BigIslandBarcode.csproj | 5 ++ BigIslandBarcode/MainPage.xaml | 6 +- BigIslandBarcode/MainPage.xaml.cs | 5 +- .../Android/CameraManager.android.cs | 82 ++++++++++++++++++- 4 files changed, 89 insertions(+), 9 deletions(-) diff --git a/BigIslandBarcode/BigIslandBarcode.csproj b/BigIslandBarcode/BigIslandBarcode.csproj index 0e373eb..efcbbc7 100644 --- a/BigIslandBarcode/BigIslandBarcode.csproj +++ b/BigIslandBarcode/BigIslandBarcode.csproj @@ -30,6 +30,11 @@ + + 4 + true + + diff --git a/BigIslandBarcode/MainPage.xaml b/BigIslandBarcode/MainPage.xaml index bb357b5..c5f0d2c 100644 --- a/BigIslandBarcode/MainPage.xaml +++ b/BigIslandBarcode/MainPage.xaml @@ -15,7 +15,7 @@ - - + BarcodeMargin="1" />-->