You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tested on Android (multiple devices such as Samsung S10e)
Everything runs great when scanning. After I've processed other stuff and navigate back to the component that holds the scanner. Everything is initialized again (tested with console.log):
However the MLKitView is black and doesn't do anything.
When pressing back (phone button) and navigating again to the scanner, everything starts working fine again.
Setting an *ngIf="initialized" works when setting this to false after scanning and true onInit. So there is an easy workaround.
But this shouldn't be necessary.
I have a similar issue in 2.0.0.
Using some ngIf may fix the problem, but it was not that easy to find the good timing: having this in the ngInit was not sufficient, so what I currently do is something like:
After upgrading to 8.8.0-alpha the initialize ngIf workaround does not work anymore for me. What I did now is removed the *ngIf and just run this.myMLKitView.disposeNativeView(); when leaving the scanner. This works well so far when testing.
Activity
Noppey commentedon Nov 25, 2022
Setting an *ngIf="initialized" works when setting this to false after scanning and true onInit. So there is an easy workaround.
But this shouldn't be necessary.
triniwiz commentedon Feb 21, 2023
@Noppey can you try with the latest version
1.0.7and lmk if this is still an issue.boutier commentedon Apr 12, 2023
I have a similar issue in
2.0.0.Using some
ngIfmay fix the problem, but it was not that easy to find the good timing: having this in thengInitwas not sufficient, so what I currently do is something like:edit:
nhuurnink commentedon Jun 10, 2024
After upgrading to 8.8.0-alpha the initialize ngIf workaround does not work anymore for me. What I did now is removed the *ngIf and just run
this.myMLKitView.disposeNativeView();when leaving the scanner. This works well so far when testing.