So from Android SDK for GcmNetworkManager
public static final int RESULT_RESCHEDULE
Indicates a task has failed to execute, and must be retried with back-off.
Task task = new OneoffTask.Builder()
.setService(MyService.class)
.setExecutionWindow(0, 15)
.setUpdateCurrent(true)
.setRequiredNetwork(Task.NETWORK_STATE_CONNECTED)
.setRequiresCharging(false)
.build();
mGcmNetworkManager.schedule(task);
Inside MyService
public int onRunTask(TaskParams taskParams) {
/** task execution logic here */
if (success) {
return RESULT_SUCCESS;
} else {
return RESULT_RESCHEDULE;
}
}
When the execution fails, it will return RESULT_RESCHEDULE, and it will be retried. So I am wondering when will it be retried?
Thanks