java.lang.Object |
↳ |
com.google.android.gms.gcm.Task |
Known Direct Subclasses
OneoffTask |
A task that will execute once,at some point within the specified window. |
PeriodicTask |
A periodic task is one that will recur at the specified interval, without needing to be
rescheduled. |
|
Summary
Nested Classes |
class |
Task.Builder |
Builder object to construct these tasks before sending them to the network manager. |
[Expand]
Inherited Constants |
From interface
android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
From interface
android.os.Parcelable
abstract
int
|
describeContents()
|
abstract
void
|
writeToParcel(Parcel arg0, int arg1)
|
|
Constants
public
static
final
int
EXTRAS_LIMIT_BYTES
The maximum size allowed for extras bundle in bytes.
Constant Value:
10240
(0x00002800)
public
static
final
int
NETWORK_STATE_ANY
Specify using setRequiredNetwork(int)
that your task will execute regardless of whether a network is available.
Constant Value:
2
(0x00000002)
public
static
final
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. This is the default.
Constant Value:
0
(0x00000000)
public
static
final
int
NETWORK_STATE_UNMETERED
Specify using setRequiredNetwork(int)
that your task will only execute if there is an unmetered network connection available.
Constant Value:
1
(0x00000001)
protected
static
final
long
UNINITIALIZED
Constant Value:
-1
(0xffffffffffffffff)
Public Methods
public
int
describeContents
()
public
Bundle
getExtras
()
Returns |
Bundle |
The extra parameters for the task set by the client.
|
public
int
getRequiredNetwork
()
If the specified network is unavailable, your task will not be run until
it is.
Returns |
int |
The network type that this task requires in order to run. See the NETWORK_TYPE_*
flavours for an explanation of what this value can be.
|
public
boolean
getRequiresCharging
()
If the device is not charging and this is set to true, your task will not be run
until it is.
Returns |
boolean |
Whether or not this task depends on the device being connected to power in order to
execute.
|
public
String
getServiceName
()
Returns |
String |
The GcmTaskService component that this task
will execute on.
|
public
boolean
isPersisted
()
Returns |
boolean |
Whether this task will be persisted across devices restarts or Google Play Services
crashes.
|
public
boolean
isUpdateCurrent
()
Returns |
boolean |
Whether or not this task will update a pre-existing task in the scheduler queue.
|
public
void
writeToParcel
(Parcel parcel, int i)
Parameters |
parcel |
Parcel
|
i |
int
|