com.google.android.gcm.server
Class Constants

java.lang.Object
  extended by com.google.android.gcm.server.Constants

public final class Constants
extends java.lang.Object

Constants used on GCM service communication.


Field Summary
static java.lang.String ERROR_DEVICE_QUOTA_EXCEEDED
          Too many messages sent by the sender to a specific device.
static java.lang.String ERROR_INTERNAL_SERVER_ERROR
          A particular message could not be sent because the GCM servers encountered an error.
static java.lang.String ERROR_INVALID_REGISTRATION
          Bad registration_id.
static java.lang.String ERROR_INVALID_TTL
          Time to Live value passed is less than zero or more than maximum.
static java.lang.String ERROR_MESSAGE_TOO_BIG
          The payload of the message is too big, see the limitations.
static java.lang.String ERROR_MISMATCH_SENDER_ID
          The sender_id contained in the registration_id does not match the sender_id used to register with the GCM servers.
static java.lang.String ERROR_MISSING_COLLAPSE_KEY
          Collapse key is required.
static java.lang.String ERROR_MISSING_REGISTRATION
          Missing registration_id.
static java.lang.String ERROR_NOT_REGISTERED
          The user has uninstalled the application or turned off notifications.
static java.lang.String ERROR_QUOTA_EXCEEDED
          Too many messages sent by the sender.
static java.lang.String ERROR_UNAVAILABLE
          A particular message could not be sent because the GCM servers were not available.
static java.lang.String GCM_SEND_ENDPOINT
          Endpoint for sending messages.
static java.lang.String JSON_CANONICAL_IDS
          JSON-only field representing the number of messages with a canonical registration id.
static java.lang.String JSON_ERROR
          JSON-only field representing the error field of an individual request.
static java.lang.String JSON_FAILURE
          JSON-only field representing the number of failed messages.
static java.lang.String JSON_MESSAGE_ID
          JSON-only field sent by GCM when a message was successfully sent.
static java.lang.String JSON_MULTICAST_ID
          JSON-only field representing the id of the multicast request.
static java.lang.String JSON_PAYLOAD
          JSON-only field representing the payload data.
static java.lang.String JSON_REGISTRATION_IDS
          JSON-only field representing the registration ids.
static java.lang.String JSON_RESULTS
          JSON-only field representing the result of each individual request.
static java.lang.String JSON_SUCCESS
          JSON-only field representing the number of successful messages.
static java.lang.String PARAM_COLLAPSE_KEY
          HTTP parameter for collapse key.
static java.lang.String PARAM_DELAY_WHILE_IDLE
          HTTP parameter for delaying the message delivery if the device is idle.
static java.lang.String PARAM_PAYLOAD_PREFIX
          Prefix to HTTP parameter used to pass key-values in the message payload.
static java.lang.String PARAM_REGISTRATION_ID
          HTTP parameter for registration id.
static java.lang.String PARAM_TIME_TO_LIVE
          Prefix to HTTP parameter used to set the message time-to-live.
static java.lang.String TOKEN_CANONICAL_REG_ID
          Token returned by GCM when the requested registration id has a canonical value.
static java.lang.String TOKEN_ERROR
          Token returned by GCM when there was an error sending a message.
static java.lang.String TOKEN_MESSAGE_ID
          Token returned by GCM when a message was successfully sent.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GCM_SEND_ENDPOINT

public static final java.lang.String GCM_SEND_ENDPOINT
Endpoint for sending messages.

See Also:
Constant Field Values

PARAM_REGISTRATION_ID

public static final java.lang.String PARAM_REGISTRATION_ID
HTTP parameter for registration id.

See Also:
Constant Field Values

PARAM_COLLAPSE_KEY

public static final java.lang.String PARAM_COLLAPSE_KEY
HTTP parameter for collapse key.

See Also:
Constant Field Values

PARAM_DELAY_WHILE_IDLE

public static final java.lang.String PARAM_DELAY_WHILE_IDLE
HTTP parameter for delaying the message delivery if the device is idle.

See Also:
Constant Field Values

PARAM_PAYLOAD_PREFIX

public static final java.lang.String PARAM_PAYLOAD_PREFIX
Prefix to HTTP parameter used to pass key-values in the message payload.

See Also:
Constant Field Values

PARAM_TIME_TO_LIVE

public static final java.lang.String PARAM_TIME_TO_LIVE
Prefix to HTTP parameter used to set the message time-to-live.

See Also:
Constant Field Values

ERROR_QUOTA_EXCEEDED

public static final java.lang.String ERROR_QUOTA_EXCEEDED
Too many messages sent by the sender. Retry after a while.

See Also:
Constant Field Values

ERROR_DEVICE_QUOTA_EXCEEDED

public static final java.lang.String ERROR_DEVICE_QUOTA_EXCEEDED
Too many messages sent by the sender to a specific device. Retry after a while.

See Also:
Constant Field Values

ERROR_MISSING_REGISTRATION

public static final java.lang.String ERROR_MISSING_REGISTRATION
Missing registration_id. Sender should always add the registration_id to the request.

See Also:
Constant Field Values

ERROR_INVALID_REGISTRATION

public static final java.lang.String ERROR_INVALID_REGISTRATION
Bad registration_id. Sender should remove this registration_id.

See Also:
Constant Field Values

ERROR_MISMATCH_SENDER_ID

public static final java.lang.String ERROR_MISMATCH_SENDER_ID
The sender_id contained in the registration_id does not match the sender_id used to register with the GCM servers.

See Also:
Constant Field Values

ERROR_NOT_REGISTERED

public static final java.lang.String ERROR_NOT_REGISTERED
The user has uninstalled the application or turned off notifications. Sender should stop sending messages to this device and delete the registration_id. The client needs to re-register with the GCM servers to receive notifications again.

See Also:
Constant Field Values

ERROR_MESSAGE_TOO_BIG

public static final java.lang.String ERROR_MESSAGE_TOO_BIG
The payload of the message is too big, see the limitations. Reduce the size of the message.

See Also:
Constant Field Values

ERROR_MISSING_COLLAPSE_KEY

public static final java.lang.String ERROR_MISSING_COLLAPSE_KEY
Collapse key is required. Include collapse key in the request.

See Also:
Constant Field Values

ERROR_UNAVAILABLE

public static final java.lang.String ERROR_UNAVAILABLE
A particular message could not be sent because the GCM servers were not available. Used only on JSON requests, as in plain text requests unavailability is indicated by a 503 response.

See Also:
Constant Field Values

ERROR_INTERNAL_SERVER_ERROR

public static final java.lang.String ERROR_INTERNAL_SERVER_ERROR
A particular message could not be sent because the GCM servers encountered an error. Used only on JSON requests, as in plain text requests internal errors are indicated by a 500 response.

See Also:
Constant Field Values

ERROR_INVALID_TTL

public static final java.lang.String ERROR_INVALID_TTL
Time to Live value passed is less than zero or more than maximum.

See Also:
Constant Field Values

TOKEN_MESSAGE_ID

public static final java.lang.String TOKEN_MESSAGE_ID
Token returned by GCM when a message was successfully sent.

See Also:
Constant Field Values

TOKEN_CANONICAL_REG_ID

public static final java.lang.String TOKEN_CANONICAL_REG_ID
Token returned by GCM when the requested registration id has a canonical value.

See Also:
Constant Field Values

TOKEN_ERROR

public static final java.lang.String TOKEN_ERROR
Token returned by GCM when there was an error sending a message.

See Also:
Constant Field Values

JSON_REGISTRATION_IDS

public static final java.lang.String JSON_REGISTRATION_IDS
JSON-only field representing the registration ids.

See Also:
Constant Field Values

JSON_PAYLOAD

public static final java.lang.String JSON_PAYLOAD
JSON-only field representing the payload data.

See Also:
Constant Field Values

JSON_SUCCESS

public static final java.lang.String JSON_SUCCESS
JSON-only field representing the number of successful messages.

See Also:
Constant Field Values

JSON_FAILURE

public static final java.lang.String JSON_FAILURE
JSON-only field representing the number of failed messages.

See Also:
Constant Field Values

JSON_CANONICAL_IDS

public static final java.lang.String JSON_CANONICAL_IDS
JSON-only field representing the number of messages with a canonical registration id.

See Also:
Constant Field Values

JSON_MULTICAST_ID

public static final java.lang.String JSON_MULTICAST_ID
JSON-only field representing the id of the multicast request.

See Also:
Constant Field Values

JSON_RESULTS

public static final java.lang.String JSON_RESULTS
JSON-only field representing the result of each individual request.

See Also:
Constant Field Values

JSON_ERROR

public static final java.lang.String JSON_ERROR
JSON-only field representing the error field of an individual request.

See Also:
Constant Field Values

JSON_MESSAGE_ID

public static final java.lang.String JSON_MESSAGE_ID
JSON-only field sent by GCM when a message was successfully sent.

See Also:
Constant Field Values