I have a Xamarin Forms 2.0 application that uses ZXing.Net.Mobile and ZXing.Net.Mobile.Forms version 2.0.3.1. I'm trying to build a simple QR code scanner, but whenever I launch the ZXingScannerPage on Android I can see the default overlay (with the text and the red line) but I don't see the output of the camera so I can't actually scan anything. I have already listed the Camera permission in my AndroidManifest:
I tried the sample code from the readme: https://github.com/Redth/ZXing.Net.Mobile as well as from their Samples/Forms project. I now have this code:
`private async void OnScanQrClicked(object sender, EventArgs e)
{
_scannerPage = new ZXingScannerPage();
_scannerPage.OnScanResult += HandleScanResult;
await Navigation.PushAsync(_scannerPage);
}
private void HandleScanResult(Result result)
{
_scannerPage.IsScanning = false;
Device.BeginInvokeOnMainThread(() =>
{
Navigation.PopAsync();
DisplayAlert("Scanned code", result.Text, "OK");
});
}`
Some more specs: I'm running Android 5.1 on a Moto G (v1).
Why am I not seeing the output of the camera?