Send a Google Cloud Messaging (GCM) Message
The Google Cloud Messaging external action receives messages and delivers them to a Google Android device, such as a Samsung Galaxy S3. The external action pushes messages to an Android app installed on the target Android device by means of a cloud service—the Google Cloud Messaging (GCM) service.
Note: The Google Cloud Messaging external action is one of two external actions that can push messages to a mobile device. For messaging iOS devices, see Send an Apple Push Message.
Requirements

Note: If you do not already have a GCM-enabled Android application, see GCM: Getting Started for an overview on how to write an Android application utilizing Google Cloud Messaging services.
When configured, a Google Cloud Messaging external action can send notifications to your target application installed on an Android device. To accomplish this scenario, the Google Cloud Messaging external action uses two requirements from your target application, both of which require developer access to the application:
- The developer's API key—The authentication mechanism when connecting to GCM cloud servers.
- The Android device’s unique GCM registration ID—Provides the Google Cloud Messaging Service with the target device for sending notifications.
Note: The registration ID is different for each unique Android device/application pair, so it cannot be shared between different applications. When configuring the Google Cloud Messaging external action to work with a new application, new registration IDs must be acquired.
For more information, see Architectural Overview.
Acquiring the Developer API Key
The developer API key authorizes applications (in this case, FME Server) to use the Google Cloud Messaging service to send notifications to Android devices. The API key is associated with the Android application developer, and generating it is a one-time process. To do so, follow the instructions in Obtaining an API Key.
The developer API key will be required when configuring the subscriber.
Acquiring the GCM Registration ID for the Target Device
Each Android device can register itself to the Google Cloud Messaging service, and when doing so, acquires a registration ID that uniquely identifies the device.
After acquiring the registration ID, the Android application on the device must distribute it to FME Server. Typically, the registration ID is sent to a processing workspace on FME Server that records the token and updates the subscriber. This flow is illustrated below.
An Android application can register to Google Cloud Messaging service by sending the com.google.android.c2dm.intent.REGISTER intent, and the registration ID is returned to the application in an intent extended string field registration_id. This process is detailed in Writing Android Applications that Use GCM.
Configuration
Note: See also Working with Parameters in Automations Workflows.
- API Key: The developer API key, used for authorizing the subscription to the Google Cloud Messaging service.
- Registration IDs: The list of target Android devices to receive messages. Use a comma to separate multiple devices.
- Collapse Key: An arbitrary string that is used to collapse multiple, similar messages when a device is offline, so that only the last message is sent. For example, if 100 messages with the same Collapse Key are sent to a device with Registration ID "2" while it is turned off, the device will only receive the last message once it is turned on.
- Notification Content Template: The notification content template.
Note: This field is primarily for testing purposes. To override this field in a production system, see below.