android - Firebase Jobdispatcher interval unreliable -


google forces me stop using alarmmanager because of excessive wakeups. should use jobscheduler, app should support older devices api <21. have use firebase jobdispatcher :-(

however, in opinion, jobdispatcher unreliable, unlike alarmmanager.

i set interval every 60 secs (1 min). gaps between jobservice.onstartjob() are:

1, 10, 6, 1, 16, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 4, 0, 1, 8 mins.

if set interval 10 mins, gaps are:

11, 10, 10, 10, 10, 10, 21, 12, 10, 10, 10, 10, 10, 15, 10, 41, 10, 13, 14, 14, 22, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 19, 10, 10, 34, 14, 10, 10, 10, 12, 10 mins.

my smartphone (samsung galaxy alpha, android 5.0.1) connected power , not in standby, power safe option deactivated.

what doing wrong?

firebasejobdispatcher dispatcher = new firebasejobdispatcher(new googleplaydriver(context));  job jobwifi = dispatcher.newjobbuilder()     .setservice(connectionjobservice.class)     .settag("tag")     .setrecurring(true)     .setlifetime(lifetime.forever)     .settrigger(trigger.executionwindow(60, 60)) // 600, 600     .setreplacecurrent(true)     .setretrystrategy(retrystrategy.default_exponential)     .setextras(extras)     .build(); 


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -