App Lifecycle State Management
- whenever the app is in the foreground and the screen is locked, if the sync request is sent it fails and the re-login after soft-logout fails and it makes a mess
- the requests are failing because the device is going into doze mode and network access is suspended
- fluffychat watches for app lifecycle change events from the system and turns off the background sync when the device is in doze mode
- I still can't figure out what Fluffychat does when we are soft logged out.