A session represents one life of your application’s process.
Usually this is the time interval between your Application.onCreate() and Application.onTerminate().
Please note Android processes tend to be long-lived, since background-running services will keep the application awake even when not in the foreground.
Usually this is the time interval between application(_:didFinishLaunchingWithOptions:) and applicationWillTerminate(_:).
Usually processes in iOS tend to die shortly after when the user leaves the application, except for applications playing music in background, containing Today widgets, etc.
Some applications perform tasks in the background even when the user is not actively interacting with the application. It is possible new sessions are started and finished automatically by the operating system when these services start and stop.
Examples of such background processes include:
- Push notifications
- Geolocation changes
- Network state changes or synchronization tasks
- Playback of music in the background
- Display of widgets