I have a problem which I am explaining below:
I want to make an app that can keep scanning even when it is minimized. So I followed the git example BarcodeSample1 and modified the activity. I have attached the MainActivity (which I modified). Basically I removed the trigger and decoders block from it which I believe I do not need for now. All I need is that even if my app is minimised it can capture the scans.
The app is working fine. It is providing me the scanned data even when it is foreground or minimized.
BUT, when I kill my app, the scanner only works once and then it dies. Now even if I open the DWDemo app, the scanner does not work at all. If I open my app again, it starts working and again dies when I kill it.
Somehow my application is not releasing the scanner and it dies and lives with my app.
I HAVE ATTACHED MY MAIN ACTIVITY