Garmin Running Activity Start/Stop

Hello, 

For my Garmin Connect application, I need to create a running activity by pressing the "Start/Stop" button and also stop it. I am able to start an activity and automatically stop it when the watch screen updates. However, I'm unable to retrieve the same view with the variable I used to start the activity in order to stop it afterward. And so, if you can help me with this onSelect() function,

Thank you very much.