private async void QrButton_Tapped(object sender, EventArgs e) { bool hasCameraAccess = await AppPermission.Camera(); if (hasCameraAccess) { QrScanner scannerPage = new QrScanner(); scannerPage.BindMethod(QrScannerCallback); await App.Navigation.NavigateModalByRenderer(scannerPage); } else { Utils.Toast("Allow permission to access camera"); } }
private async void OpenQrScanner(object sender, EventArgs e) { bool hasCameraAccess = await AppPermission.Camera(); if (hasCameraAccess) { QrScanner scannerPage = new QrScanner(); scannerPage.BindMethod(OnScannedResult); await App.Navigation.NavigateByRenderer(scannerPage); } else { Utils.Toast("Allow permission to access camera"); } }