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
Post a Comment