i've a question for you about Xamarin Zxing Forms library. I was playing with the ZxingScannerView object with his own method get and set bool IsScanning and IsAnalizing. On my custom overlay i've setted an option button which open a new page and i played to test it with his orientation device situation for every operation system, like Android or Ios. Ios works very well, but for Android i've a problem about the camera device, when crashed my app into the NullReferenceException.
System.NullReferenceException: Object reference not set to an instance of an object.
My code to set the page to view with navigation Page and set the scanner option are these
scanner.IsAnalyzing = false;
scanner.IsScanning = true;
NavigationPage nav = new NavigationPage(new Page());
Navigation.PushModalAsync(nav);
And also i've managed these with his override method on Appear and Disappear situation
protected override void OnAppearing()
{
base.OnAppearing();
scanner.IsEnabled = false;
scanner.IsAnalyzing = false;
scanner.IsScanning = false;
}
protected override void OnDisappearing()
{
base.OnDisappearing();
scanner.IsEnabled = true;
scanner.IsAnalyzing = true;
scanner.IsScanning = true;
}
Anyone has got the solution about these problem?