update MainActivity.java add function of onStop()