We are using GcmTaskService for uploading entities created by the user asynchronously to our server.
This is working for couple of thousands of users without any issues, but for at least two users the tasks get scheduled but will never run.
We use this code to schedule the task (scheduling
is a custom object holding some parameters required to schedule the task):
// Build the OneOffTask
OneoffTask task = new OneoffTask.Builder()
.setExecutionWindow(2, 5)
.setService(MyGcmTaskService.class)
.setTag(scheduling.getTag())
.setUpdateCurrent(true)
.setRequiredNetwork(scheduling.isWiFiRequired() ? OneoffTask.NETWORK_STATE_UNMETERED : OneoffTask.NETWORK_STATE_CONNECTED)
.setExtras(scheduling.getExtrasBundle())
.build();
// Schedule it
this.mManager.schedule(task);
We are using com.google.android.gms:play-services-gcm:9.8.0
. Thanks!