flutter_fgbg icon indicating copy to clipboard operation
flutter_fgbg copied to clipboard

fbgb listener not working when shouldAttachEngineToActivity overriden

Open qeepcologne opened this issue 5 months ago • 0 comments

i am listening to fbgb events in main app state like that: ´´´ fgbgListener = FGBGEvents.instance.stream.listen((event) { _logger.t("fbgb event: ${event.name}"); }); ´´´ this works fine, until i Override shouldAttachEngineToActivity() with false in MyActivity extends FlutterActivity.

use case for fbgb is to ask for pin code when app is resumed from minimized. why do i override the shouldAttachEngineToActivity? Otherwise Activity is destroyed and recreated when i opening fcm (even if cached instance is used and app is in foreground).

similar listeners like didChangeAppLifecycleState still working.

qeepcologne avatar Sep 09 '24 13:09 qeepcologne