class AutoSave
(source)
AutoSave(sessionManager: SessionManager, sessionStorage: SessionStorage, minimumIntervalMs: Long) |
fun periodicallyInForeground(interval: Long = 300, unit: TimeUnit = TimeUnit.SECONDS, scheduler: ScheduledExecutorService = Executors.newSingleThreadScheduledExecutor(), lifecycle: Lifecycle = ProcessLifecycleOwner.get().lifecycle): AutoSave
Saves the state periodically when the app is in the foreground. |
|
fun whenGoingToBackground(lifecycle: Lifecycle = ProcessLifecycleOwner.get().lifecycle): AutoSave
Saves the state automatically when the app goes to the background. |
|
fun whenSessionsChange(): AutoSave
Saves the state automatically when the sessions change, e.g. sessions get added and removed. |