From 55fb71744df8fe504b31ea12d0c5a8bcead366c6 Mon Sep 17 00:00:00 2001 From: mpbw2 <59324545+mpbw2@users.noreply.github.com> Date: Wed, 17 Jan 2024 13:03:11 -0500 Subject: [PATCH] Improve TOTP scan performance on Android --- src/Core/Pages/Vault/ScanPage.xaml.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Core/Pages/Vault/ScanPage.xaml.cs b/src/Core/Pages/Vault/ScanPage.xaml.cs index a3d78f293..fc71c96c5 100644 --- a/src/Core/Pages/Vault/ScanPage.xaml.cs +++ b/src/Core/Pages/Vault/ScanPage.xaml.cs @@ -54,6 +54,13 @@ namespace Bit.App.Pages { if (_cameraView == null) { return; } + if (DeviceInfo.Platform == DevicePlatform.Android) + { + // Reduce the size of the camera view to improve performance, scale it up to fill the space + _cameraView.WidthRequest = _cameraView.HeightRequest = 150; + _cameraView.Scale = 4; + } + ViewModel.StartCameraCommand?.Execute(this); _pageIsActive = true;