Add function to termiate MainActivty after pressing the stop button