-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Goes Black when using NavigationPage #7
Comments
It works with Android 12/sdk 31+ |
It does not work even with Android 12/sdk 31+ when it is used inside navigation page. Is there a workaround |
Has someone found a solution or workaround? |
I dot the same problem using AppShell and tabbed pages. When tabbing to another page and going back, the camera disappears. The camera object is probably destroyed when changing to another tab, and not reinitialized when the page gets in focus. Could be that the MainPage get initialized before it get focused, and when it get focused it is never properly initialized. It was easy to reproduce in the BigIslandBarcode project Replace |
This is still an issue. The issue lies here: ZXing.Net.Maui/ZXing.Net.MAUI/Platforms/Android/CameraManager.android.cs Lines 100 to 102 in 71a6ea2
When using a FlyoutPage (for example), QuickWatch: ContentPage |
fixed camera not getting assigned by using current activity as a fallback. Closes Redth#7
Hello, I am try ZXing.Net.Maui on .NET 6 Framework and sometimes the camera just turns black. Is anyone know what is the fix for this issue? I have also noticed an other preview version of ZXing.Net.Maui on NuGet supporting NET 7, do you know if the black screen issue will be addressed on that version ? Thank you |
If you understand the bug, don't you know how to fix it upstream? (i.e. propose a PR?) |
Same issue here, with a NavigationPage the view is Black. |
I found a workaround for this, you need to recreate and re-assign the camera view with something like the following:
Replace "CameraView" with the name of your CameraBarcodeReaderView, |
|
Thank you for the workaround. It worked for me. |
Solution it's working for me is open CameraBarcodeReaderView in Shell modal Viewmodel:
Xaml Page (modal):
|
Can someone propose a PR instead of posting workarounds? :) |
I agree, I can take a look at this this weekend if you all want |
Only way atm to use the components is by setting the MainPage manually, when pushing and poping using navigation it will cause the component not to initialize.
The text was updated successfully, but these errors were encountered: