A task that will execute once,at some point within the specified window. If one of
cancelTask(String, Class) or
cancelAllTasks(Class) is called before this executes it will be cancelled. Note
that you can request a one-off task to be executed at any point in the future, but to prevent
abuse the scheduler will only set an alarm at a minimum of 30 seconds in the future. Your
task can still be run earlier than this if some network event occurs to wake up the
Nested Class Summary
|class||OneoffTask.Builder||Builder class for constructing
Inherited Constant Summary
|int||EXTRAS_LIMIT_BYTES||The maximum size allowed for extras bundle in bytes.|
|public static final Creator<OneoffTask>||CREATOR|
Public Method Summary
Inherited Method Summary
If the specified network is unavailable, your task will not be run until it is.
If the device is not charging and this is set to true, your task will not be run until it is.
writeToParcel(Parcel arg0, int arg1)
public long getWindowEnd ()
- The number of seconds from now by which this task must have executed.
public long getWindowStart ()
- The number of seconds from now at which this task is eligible for execution.
public void toBundle (Bundle bundle)
Insert the task object into the provided bundle for IPC. Use #fromBundle to recreate the object on the other side.