I'm using activity recognition api and location using google play services and I'm aware of how battery consuming they are so I would actually be pleased if this is the case and the Job Service stops when the screen is on which limits the collection of data to when the user is actually using his phone and not 24/7.
When I tried testing this, sometimes it stops after half an hour, sometimes more and at times it happens immediately so is this related to other background services and the current apps that are being used ? and is there a way to force the service to stop when the screen is off ?
As for the code I'm using the exact sample that I downloaded from the repository and the only modification that I made was calling the recognition service from the job service whenever the service is triggered (periodic task)