Im not sure if it is the best way to do it (specially because I do not know this task service class), but one idea that came to my mind was of having the variable defined in a class that extends the Application. Here it is an article describing the Application class and illustrating the creation of class that extends it to manage some "global data"
In that way, you can set/get it in the different activities.