In my application, I have a snippet using dm77 / barcodescanner .
I’m working on a store application, for example: you are viewing an item → a product page → continue the purchase → open another scanner session → etc.
Now, as you can see, because the client needs to support the back stack, several events of this fragment can be opened (but not at the same time).
The first fragment with the scanner works well, the rest have a still image, even if I call
scannerView.stopCamera();
scannerView = null;
leaving the first fragment.
NOTE: another snippet works well if we use replace instead of adding. But this will create problems with the animation of the fragments.
source
share