0
I made an application using the class Jobscheduler that has now come in the Lolipop api.
I won’t go into detail about the structure of the application because it is running and working properly.
My point is about an option that exists in the construction of a Jobscheduler:
To create a Job you must know that the Jobinfo.Builder where the option exists setRequiresCharging()...
Anyway, my application creates these Obs, in fact the application is nothing more than a registration screen of Obs... I created two Jobs one just to run with it loading and the other without it loading. It rotates every 2 minutes that Job he needs to be carrying.
The problem is that it runs both tasks with the phone out of the charger. I’m running this on a Nexus 5 with android 6 already.
Does anyone know why he runs a Job that was created with the setRequiresCharging
as true
even with the mobile not charging?
UPDATING
The way I have to check if Job is running is by creating a notification with the precise time it ran, each job has its notification and manages it, default scheme of if it doesn’t exist it creates and displays, if it is already being displayed it updates the time of execution, this is working perfectly.