예제 #1
0
        private async void gotoScannerPage(Object sender, EventArgs e)
        {
            var cameraPermission = new CameraPermission(CrossPermissions.Current);
            await cameraPermission.RequestCameraPermissionIfNeeded();

            Navigation.PushAndRemovePrevious(ScannerPageControl.Instance.CreateScannerPage(), 1);
        }
예제 #2
0
        private async void Button_Clicked(object sender, EventArgs e)
        {
            var cameraPermission = new CameraPermission(CrossPermissions.Current);
            var result           = await cameraPermission.RequestCameraPermissionIfNeeded();

            if (result)
            {
                if (Navigation.NavigationStack.LastOrDefault() is BarcodePage == false)
                {
                    await Navigation.PushAsync(new BarcodePage());
                }
            }
            else
            {
                await DisplayAlert("오류", "카메라 접근 권한 없음", "확인");
            }
        }