I am using android-priority-job-queue 'com.github.yigit:android-priority-jobqueue'. To make sure it runs every 2 minutes. Below is the code
public PoolingJob () {
// This job requires network connectivity,
// and should be persisted in case the application exits before job is completed.
super (new Params (PRIORITY).requireNetwork ().groupBy (Const.POOLING_QUEUE_GROUP)
.delayInMs (120000).persist ());//120 sec delay
}
But it get suspended whenever the app is closed or removed from memory. How do make job run continuously and do pooling every 2 mins, when the app is closed or removed from memory. Is there anything like sticky service or android.permission.BIND_JOB_SERVICE ?
Building server pooling system. Require API 15 above.