Open Rdevc opened 3 years ago
I'm guessing wrapping that alert
in a setTimeout
should help.
Thanks for your answer!
I've tried that solution with a set timeout of 1000. The alert will work but when I hit te scan button again the alert appears again inside the scanner. After scanner two or three times ill get 3 alerts popping over each other.. It's like something is not closing and I'm still not sure if it is my code or something else.
As you can see I'm not using complex code or something.
Hmm, maybe you're showing the scanner inside a modal? Not that that's wrong, but it may be an edge case, combined with an alert. I don't really have time to look into it.. but maybe using a Toast or something else than an alert will get around it?
Got it, thank you!
presentInRootViewController: true
This was the issue.. I've copied the code from GitHub and your last message got me thinking about the modal..
it looks like
Fullscreen: true or Fullscreen: false
is not doing anything but deleting excluding the "presentInroot" showed me an alert without any warning or error.
Maybe I'll look into that in te future if I got some time and know how to debug the plugin but for now its ok for me.
It's up to you if you want this issue to be open to work on it later or close it.
Kind regards.
Oh that's nice! Glad you found a way to make it disappear.
Hi!
When I use the scanner and the code scanned did not match a param an alert is triggered to let the user know the scan is wrong. So in the result I have the following line to test:
This bit of code results in the next warning/error:
No alert is showing up which is obvious if you look at the warning/error.
I'm using: "@angular/core": "~11.2.5", "@nativescript/core": "8.0.2", "nativescript-barcodescanner": "^4.1.0",
Anyone a suggestion how to fix this? Is it a scanner issue or do I do something wrong?
Thanks in advance for any answer!!