flutter_fgbg
flutter_fgbg copied to clipboard
Is there a way to detect if the "app switcher view of an iOS device" is open?
Hi 👋 @ajinasokan, thanks for building this package 🚀. Currently, it can detect if the app is in background or foreground state successfully.
However, it doesn't detect if the app is in app switcher state. I also want to detect if the app is in that state.
If you wonder what app switcher is where you can see the recently opened apps (or currently open apps).
- On iOS devices with home buttons (for ex: iPhone 6,7,8 etc): if you double tap the device's home button on the bottom, it shows the app switcher view of iOS.
- On iOS devices with full size screen (for ex: iPhone X,11,12,13 etc): if you swipe the bottom screen handle up and wait for a while, it shows the app switcher view of iOS.
- Similar things apply on Android devices too. It can be opened either with tapping the square shaped virtual button or swiping the handle up.
Please consider this as a feature request if there is not a way of doing it. Thanks a lot.
The PR #3 solves this issue.
Are you sure you don't get these events from WidgetsBindingObserver
? This lib is meant to be a fix for the shortcomings of WidgetsBindingObserver
and not a replacement. If it doesn't provide the required events then I will take a detailed look at it.
My use case: download fresh data as soon as user has internet. As per connectivity_plus, just their stream isn't enough, because it doesn't update when app returns to forground from background.
What is perfect about this app for my use case is that I don't need to add a widget to get that stream of events. So I think there is room to say that this app could offer events for more life cycles, even if WidgetsBindingObserver has them too. There could be a new stream with the more extended changes, because their need is less common.