コード例 #1
0
        private async Task CheckPermissions()
        {
            var cameraPermission = await _permissionService.PreCheckPermissionsAccessAsync(Permission.Camera);

            if (cameraPermission == PermissionStatus.Granted)
            {
                IsCameraAccessGranted = true;
                return;
            }

            var result = await _permissionService.CheckPermissionsAccesGrantedAsync(Permission.Camera);

            if (result)
            {
                IsCameraAccessGranted = true;
                return;
            }
        }