onStop
onStop is a callback in the Android Activity lifecycle. It is invoked when the activity is no longer visible to the user. It occurs after onPause, typically when another activity comes to the foreground or the user navigates away from the app, or when the activity is finishing. The system may keep the activity instance in memory after onStop, allowing a quick return if the user navigates back.
The main purpose of onStop is to release or suspend resources that are not needed while the
If the user returns to the activity, onRestart and onStart (and onResume) may be called to bring
Note that onStop is not guaranteed to be called in every situation. If the process hosting the