clhols
06/04/2020, 3:58 PMsessionTimeOutJob = GlobalScope.launch {
delay(5.minutes)
activity.finishAffinity()
}
So after 5 minutes the coroutine should resume and call finishAffinity(). But it doesn't happen on release builds. Only on debug builds. On release builds it first resumes when the app is selected in the Recents menu. Long past the 5 minute mark.
Is it somehow the app lifecycle that prevents the coroutine from resuming?Adam Powell
06/04/2020, 6:49 PMkill -9
your process any time it likes, that's probably what's happening here shortly after your activities leave the foreground.