afriscic / BarcodeScanning.Native.Maui

Barcode scanning library for .NET MAUI
https://www.nuget.org/packages/BarcodeScanning.Native.Maui
MIT License
162 stars 31 forks source link

does not work with content page and flyout #58

Open figuerres opened 4 months ago

figuerres commented 4 months ago

i created a simple maui 8 application with the default home page. i added a content page to have the barcode scan. i copied the code from your test app and built it for my device. when i run it the first time i go to the barcode page via the flyout it works. if i go back to the home page and then back to the barcode page the camera preview is not working.

it seems like maui may have a bug in how it works with the camera.

i am trying other control packages and seeing the same pattern something in the content page navigation with the camera .

Olaf-R commented 4 months ago

You might be having issues due to the manual disposing of CameraView. Have you seen #8 ("From version 1.2.2 automatic disposing of ...") in the ReadMe?

figuerres commented 4 months ago

i did not see any exception thrown in visual studio. also i am finding that other packages for barcode seem to have a related problem. i am starting to feel that there may be a maui/android/camera problem....

i may have to just not scan barcodes for now in the app i am building.

Olaf-R commented 4 months ago

It might actually be a device-related problem. Have you tried to clone and run @afriscic's test-app that comes with the original repository?