Closed nathan1658 closed 2 years ago
Currently Im using native_admob_flutter to my flutter app. I also included AppOpen Ad and Interstital ad.
I want to display the AppOpen ad when user open the app/ resume to the app, here is how I do it in main.dart:
Future<void> didChangeAppLifecycleState(AppLifecycleState state) async { switch (state) { case AppLifecycleState.resumed: loadAndDisplayAppOpenAd(); break; case AppLifecycleState.inactive: break; case AppLifecycleState.paused: break; case AppLifecycleState.detached: break; } }
However I found that displaying Interstial ad will also change the app state -> inactive -> paused -> resume, which trigger AppOpen ad.
Is there a way to overcome this?
Maybe https://pub.dev/packages/flutter_fgbg
Thanks for the quick response, tested on both ios and android and works like a charm!!
Currently Im using native_admob_flutter to my flutter app. I also included AppOpen Ad and Interstital ad.
I want to display the AppOpen ad when user open the app/ resume to the app, here is how I do it in main.dart:
However I found that displaying Interstial ad will also change the app state -> inactive -> paused -> resume, which trigger AppOpen ad.
Is there a way to overcome this?