When Firebase Crashlytics tags a crash event with "Happened in the first second of the User's session".
One obvious scenario is when the user clicks the App icon and the app crashed within 1 second.
Could this also mean, When the user has put the App in the background and gets back on it Later?
I think It might include the scenarios when the system had cleared all the activities while in the background, and getting back on it restarts the activity it was previously visible.
Any reference to documentation will also one helpful.
Why look at documentation when we can look at the actual code :) Here's the class that Crashlytics uses for managing Sessions, and it says:
This will happen at a cold start of the app, and when the app has been in the background for a period of time (default 30 min) and then comes back to the foreground.
Looking further, this timeout can be configured remotely through your Firebase settings as well as locally:
/** Background timeout config value before which a new session is generated. */
val sessionRestartTimeout: Duration
get() {
localOverrideSettings.sessionRestartTimeout?.let {
if (isValidSessionRestartTimeout(it)) {
return it
}
}
remoteSettings.sessionRestartTimeout?.let {
if (isValidSessionRestartTimeout(it)) {
return it
}
}
// SDK Default
return 30.minutes
}
And finally, this is the documentation from Google Analytics, which I presume, should be identical to Crashlytics, and describes roughly the same behavior as can be seen from the Crashlytics' sources.