Added docs for isInBackground

This commit is contained in:
Thompson3142 2024-12-12 23:06:13 +01:00
parent 9ebae13a43
commit 0f0d610465
1 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,11 @@ object AppLifecycleObserver : DefaultLifecycleObserver {
Log.d(TAG, "App moved to background: ")
}
/**
* Returns if the app is currently in the background
* or in case of a crash the state when the crash happened
*/
fun isInBackground(): Boolean {
return sharedPreferences.getBoolean(KEY_IS_IN_BACKGROUND, true)
}