QR 스캐너 게이트 수정: DeviceType 휴리스틱 오판(실기기에서 스캐너 미표시) — iOS 시뮬레이터만 폴백, Android 는 항상 스캐너
This commit is contained in:
parent
0cb16c8830
commit
bbbd83fe58
6 changed files with 5 additions and 1 deletions
|
|
@ -22,7 +22,11 @@ public sealed class ConnectPage : ContentPage
|
|||
HorizontalTextAlignment = TextAlignment.Center, HeightRequest = 120,
|
||||
BackgroundColor = Colors.Black, TextColor = Colors.LightGray,
|
||||
};
|
||||
if (DeviceInfo.Current.DeviceType == DeviceType.Physical)
|
||||
// 게이트 대상은 "iOS 시뮬레이터" 뿐: Android 는 실기기·에뮬레이터 모두 스캐너 표시
|
||||
// (DeviceType 휴리스틱이 실기기에서 가상으로 오판하면 QR 이 아예 안 뜨는 결함이 됨)
|
||||
var isIosSimulator = DeviceInfo.Current.Platform == DevicePlatform.iOS
|
||||
&& DeviceInfo.Current.DeviceType == DeviceType.Virtual;
|
||||
if (!isIosSimulator)
|
||||
{
|
||||
var scanner = new ZXing.Net.Maui.Controls.CameraBarcodeReaderView
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue