| Known Direct Subclasses |
Encapsulates the parameters of a task that you will schedule on the GcmNetworkManager.
Construct instances of either PeriodicTask or
OneoffTask with
the desired parameters/behaviour and schedule them using
schedule(Task).
| class | Task.Builder | Builder object to construct these tasks before sending them to the network manager. | |
| int | EXTRAS_LIMIT_BYTES | The maximum size allowed for extras bundle in bytes. |
| int | NETWORK_STATE_ANY | Specify using
setRequiredNetwork(int) that your task will execute regardless of
whether a network is available. |
| int | NETWORK_STATE_CONNECTED | Specify using
setRequiredNetwork(int) that your task will only execute if some
sort of data connection is available - either metered or unmetered. |
| int | NETWORK_STATE_UNMETERED | Specify using
setRequiredNetwork(int) that your task will only execute if there is an
unmetered network connection available. |
| long | UNINITIALIZED |
| int | |
| Bundle | |
| int |
getRequiredNetwork()
If the specified network is unavailable, your task will not be
run until it is.
|
| boolean |
getRequiresCharging()
If the device is not charging and this is set to true, your task will
not be run until it is.
|
| String | |
| String |
getTag()
|
| boolean | |
| boolean | |
| void |
writeToParcel(Parcel parcel, int
i)
|
The maximum size allowed for extras bundle in bytes.
Specify using
setRequiredNetwork(int) that your task will execute regardless of
whether a network is available.
Specify using
setRequiredNetwork(int) that your task will only execute if some sort
of data connection is available - either metered or unmetered. This is the
default.
Specify using
setRequiredNetwork(int) that your task will only execute if there is an
unmetered network connection available.
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.
GcmTaskService
component that this task will execute on.
onRunTask(com.google.android.gms.gcm.TaskParams) when this task
executes.