I made an application using the class JobScheduler that came now in lolipop api.
I will not go into detail about the structure of the application because it is running and working properly.
My point is about an option that exists when building a JobScheduler:
To create a Job, you should know that the JobInfo.Builder where setRequiresCharging (boolean) ...
Finally, my application creates these jobs, in fact the application is nothing more than a job registration screen ... I created two Jobs one just to run with it loading and another without it loading. He runs every 2 minutes that Job he needs to be carrying.
The problem is that it runs both tasks with the mobile phone out of the charger. I'm running this on a Nexus 5 with android 6 already.
Does anyone know why it ran a Job that was created with setRequiresCharging
as true
even with the cell not loading?
UPDATE
The way I have to check if the Job is running is by creating a notification with the precise time it ran, each job has its notification and administers it, default scheme if it does not exist it creates and displays if it is already showing it updates the time of execution, this is working perfectly.