AndroidTutorialForBeginners icon indicating copy to clipboard operation
AndroidTutorialForBeginners copied to clipboard

How to check ideal state if application when its in background?

Open lmk07 opened this issue 3 years ago • 1 comments

hi I'm having the android application. i will be putting the application to background. now i need to check, if the app is active or ideal state. for example : some application may do some operation even though its in background, like playing Audio or Video or downloading.

i want to know how to check it in android studio? thanks

lmk07 avatar Jul 09 '21 05:07 lmk07

Hey, what do you mean by "i need to check, if the app is active or ideal state" and why do you need to check that? When the app goes into the background the onPause() method is called before the app "disappears" from the screen. If you close the app completely the onDestroy() method is called and is in idle state.

In your context the app is in the Pause-State.

codinguyy avatar Oct 02 '22 19:10 codinguyy