yuriy-budiyev / code-scanner

Code scanner library for Android, based on ZXing
MIT License
1.1k stars 267 forks source link

Flash enable disable not working on onPause() or onStop() #158

Closed HunterPillu closed 2 years ago

HunterPillu commented 2 years ago

tried to switching off the flash programmatically on Fragment's onPause() and onStop() lifecycle methods.

Issue : isFlashEnabled set to false but flash remains ON

@Override public void onStop(){ mCodeScanner.setFlashEnabled(false); super.onStop(); }

HunterPillu commented 2 years ago

@Override public void onStop(){ mCodeScanner.setFlashEnabled(false); mCodeScanner.releaseResources(); super.onStop(); }

it solves the issue.