onStop

open fun onStop()

This function runs ONCE when the stop button is pressed.