Julian Steenbakker
Committed by GitHub

Merge pull request #713 from androi7/master

fix: Adapt app lifecycle states. In Android would the permission pop …
... ... @@ -162,16 +162,15 @@ class _MobileScannerState extends State<MobileScanner>
switch (state) {
case AppLifecycleState.resumed:
_resumeFromBackground = false;
_startScanner();
if (_resumeFromBackground) {
_startScanner();
}
break;
case AppLifecycleState.paused:
_resumeFromBackground = true;
break;
case AppLifecycleState.inactive:
if (!_resumeFromBackground) {
_controller.stop();
}
_resumeFromBackground = true;
_controller.stop();
break;
case AppLifecycleState.detached:
break;
... ...