Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Exemplo de como criar um barcode scanner com Xamarin.Forms http://julianocustodio.com/scanner
private void OpenScanner(object sender, EventArgs e)
{
Scanner();
}
public async void Scanner()
{
var ScannerPage = new ZXingScannerPage();
ScannerPage.OnScanResult += (result) => {
// Parar de escanear
ScannerPage.IsScanning = false;
// Alert com o código escaneado
Device.BeginInvokeOnMainThread(() => {
Navigation.PopAsync();
DisplayAlert("Código escaneado", result.Text, "OK");
});
};
await Navigation.PushAsync(ScannerPage);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.