public final class

Constants

extends Object
java.lang.Object
   ↳ com.google.android.gcm.server.Constants

Class Overview

Constants used on GCM service communication.

Summary

Constants
String ERROR_DEVICE_QUOTA_EXCEEDED Too many messages sent by the sender to a specific device.
String ERROR_INTERNAL_SERVER_ERROR A particular message could not be sent because the GCM servers encountered an error.
String ERROR_INVALID_REGISTRATION Bad registration_id.
String ERROR_INVALID_TTL Time to Live value passed is less than zero or more than maximum.
String ERROR_MESSAGE_TOO_BIG The payload of the message is too big, see the limitations.
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.
String ERROR_MISSING_COLLAPSE_KEY Collapse key is required.
String ERROR_MISSING_REGISTRATION Missing registration_id.
String ERROR_NOT_REGISTERED The user has uninstalled the application or turned off notifications.
String ERROR_QUOTA_EXCEEDED Too many messages sent by the sender.
String ERROR_UNAVAILABLE A particular message could not be sent because the GCM servers were not available.
String GCM_SEND_ENDPOINT Endpoint for sending messages.
String JSON_CANONICAL_IDS JSON-only field representing the number of messages with a canonical registration id.
String JSON_ERROR JSON-only field representing the error field of an individual request.
String JSON_FAILURE JSON-only field representing the number of failed messages.
String JSON_MESSAGE_ID JSON-only field sent by GCM when a message was successfully sent.
String JSON_MULTICAST_ID JSON-only field representing the id of the multicast request.
String JSON_PAYLOAD JSON-only field representing the payload data.
String JSON_REGISTRATION_IDS JSON-only field representing the registration ids.
String JSON_RESULTS JSON-only field representing the result of each individual request.
String JSON_SUCCESS JSON-only field representing the number of successful messages.
String PARAM_COLLAPSE_KEY HTTP parameter for collapse key.
String PARAM_DELAY_WHILE_IDLE HTTP parameter for delaying the message delivery if the device is idle.
String PARAM_DRY_RUN HTTP parameter for telling gcm to validate the message without actually sending it.
String PARAM_PAYLOAD_PREFIX Prefix to HTTP parameter used to pass key-values in the message payload.
String PARAM_REGISTRATION_ID HTTP parameter for registration id.
String PARAM_RESTRICTED_PACKAGE_NAME HTTP parameter for package name that can be used to restrict message delivery by matching against the package name used to generate the registration id.
String PARAM_TIME_TO_LIVE Prefix to HTTP parameter used to set the message time-to-live.
String TOKEN_CANONICAL_REG_ID Token returned by GCM when the requested registration id has a canonical value.
String TOKEN_ERROR Token returned by GCM when there was an error sending a message.
String TOKEN_MESSAGE_ID Token returned by GCM when a message was successfully sent.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String ERROR_DEVICE_QUOTA_EXCEEDED

Too many messages sent by the sender to a specific device. Retry after a while.

Constant Value: "DeviceQuotaExceeded"

public static final 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.

Constant Value: "InternalServerError"

public static final String ERROR_INVALID_REGISTRATION

Bad registration_id. Sender should remove this registration_id.

Constant Value: "InvalidRegistration"

public static final String ERROR_INVALID_TTL

Time to Live value passed is less than zero or more than maximum.

Constant Value: "InvalidTtl"

public static final String ERROR_MESSAGE_TOO_BIG

The payload of the message is too big, see the limitations. Reduce the size of the message.

Constant Value: "MessageTooBig"

public static final 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.

Constant Value: "MismatchSenderId"

public static final String ERROR_MISSING_COLLAPSE_KEY

Collapse key is required. Include collapse key in the request.

Constant Value: "MissingCollapseKey"

public static final String ERROR_MISSING_REGISTRATION

Missing registration_id. Sender should always add the registration_id to the request.

Constant Value: "MissingRegistration"

public static final 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.

Constant Value: "NotRegistered"

public static final String ERROR_QUOTA_EXCEEDED

Too many messages sent by the sender. Retry after a while.

Constant Value: "QuotaExceeded"

public static final 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.

Constant Value: "Unavailable"

public static final String GCM_SEND_ENDPOINT

Endpoint for sending messages.

Constant Value: "https://android.googleapis.com/gcm/send"

public static final String JSON_CANONICAL_IDS

JSON-only field representing the number of messages with a canonical registration id.

Constant Value: "canonical_ids"

public static final String JSON_ERROR

JSON-only field representing the error field of an individual request.

Constant Value: "error"

public static final String JSON_FAILURE

JSON-only field representing the number of failed messages.

Constant Value: "failure"

public static final String JSON_MESSAGE_ID

JSON-only field sent by GCM when a message was successfully sent.

Constant Value: "message_id"

public static final String JSON_MULTICAST_ID

JSON-only field representing the id of the multicast request.

Constant Value: "multicast_id"

public static final String JSON_PAYLOAD

JSON-only field representing the payload data.

Constant Value: "data"

public static final String JSON_REGISTRATION_IDS

JSON-only field representing the registration ids.

Constant Value: "registration_ids"

public static final String JSON_RESULTS

JSON-only field representing the result of each individual request.

Constant Value: "results"

public static final String JSON_SUCCESS

JSON-only field representing the number of successful messages.

Constant Value: "success"

public static final String PARAM_COLLAPSE_KEY

HTTP parameter for collapse key.

Constant Value: "collapse_key"

public static final String PARAM_DELAY_WHILE_IDLE

HTTP parameter for delaying the message delivery if the device is idle.

Constant Value: "delay_while_idle"

public static final String PARAM_DRY_RUN

HTTP parameter for telling gcm to validate the message without actually sending it.

Constant Value: "dry_run"

public static final String PARAM_PAYLOAD_PREFIX

Prefix to HTTP parameter used to pass key-values in the message payload.

Constant Value: "data."

public static final String PARAM_REGISTRATION_ID

HTTP parameter for registration id.

Constant Value: "registration_id"

public static final String PARAM_RESTRICTED_PACKAGE_NAME

HTTP parameter for package name that can be used to restrict message delivery by matching against the package name used to generate the registration id.

Constant Value: "restricted_package_name"

public static final String PARAM_TIME_TO_LIVE

Prefix to HTTP parameter used to set the message time-to-live.

Constant Value: "time_to_live"

public static final String TOKEN_CANONICAL_REG_ID

Token returned by GCM when the requested registration id has a canonical value.

Constant Value: "registration_id"

public static final String TOKEN_ERROR

Token returned by GCM when there was an error sending a message.

Constant Value: "Error"

public static final String TOKEN_MESSAGE_ID

Token returned by GCM when a message was successfully sent.

Constant Value: "id"