mobile_scanner
mobile_scanner copied to clipboard
I need to use the scanner in two places...
but when I use different instances on each view, it seems like there are some resources that are shared so I need to properly handle the start/stop and disposal of resources. I get "start() already called" (even I stop it on the other view) and other problems (stops scanning).
This is my setup: A bottom bar with three buttons, opening three views.
Left bottom bar button: a view with a button. Pressing the button it pushes the scanner. Then the user can press 'back' back to the view, disposing the scanner. Middle bottom bar button: shows the scanner, which the user can use right away. (it never disposes as it's in the bottom bar)
How do I manage the resources just so I can have the set up I mentioned? One instance will never dispose, and the other will come in and out.