Skip to content

Commit

Permalink
Added docs for isInBackground
Browse files Browse the repository at this point in the history
  • Loading branch information
Thompson3142 committed Dec 12, 2024
1 parent 9ebae13 commit 0f0d610
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 0f0d610

Please sign in to comment.