I'm using Yigits fork of the Path Android Job Queue library to make API calls. I've made a simple class to ping the API. In the class constructor I'm calling super() like this:
super(new Params(Priority.LOW).groupBy(GROUP).requireNetwork().persist());
and then making the actual call in the onRun() method:
@Override
public void onRun() throws Throwable {
Call<String> request = mAPI.getPing();
request.enqueue(new PingCallback());
}
The problem is, if I use .persist() in the constructor, onRun() is never called. If I remove it, the call is made and everything works. The Job is serializable (as it extends BaseJob which in turn extends Job from the lib, which implements Serializable), so that's not the cause. The onAdded() method is empty. Can anyone please help me out with this one.
Thanks :)