Using the Activity lifecycle to start and stop the thread