Function
onDestroy in my activity class is called when the screen falls asleep or the screen is locked. I know this should not happen, as the control flow must be enabled onPause () -> onStop (). On the lock screen, the control flow is as follows: onPause () → onStop () → onDestroy () . I gave android:configChanges="orientation|keyboardHidden" in my android manifest, as suggested by answers to similar questions, but that didn't work. The isFinishing () function returns false when checking with onStop ().
Can anyone help me solve this problem.
source share