Sends messages to Android devices using Google Cloud Messaging (GCM).
This transformer accepts any feature.
Input features are output through this port with an additional attribute (_gcm_response) that contains the raw response from GCM. If more than one call was made to GCM then this will be a JSON Array of all the responses.
Any registration IDs that GCM has new values for in its database will be output through here as part of the _old_id attribute. The new “Canonical ID” will be contained in the _new_id attribute. It is recommended that you replace the old ID with the new one as it will eventually get deleted from GCM storage.
Registration IDs of devices that no longer have the app (for which they were issued) installed will be output through here as part of the _unregistered_id attribute. These should be removed from your database.
If any other error occurs, the error code and the corresponding registration ID will be output through this port.
The source of the message. To build a message from parameters, use From Parameters. To manually build a message from raw JSON, use From Custom JSON.
The final destination of the message. To deliver the message to Android devices, use GCM Server. To output the message to an attribute, use Output Attribute.
When Send Message To is Output Attribute, the name of the output attribute that will contain the message.
When Send Message To is GCM Server, the API key. The GCM developer API key is used for authorizing the transformer to the Google Cloud Messaging service. 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.
Message Content Parameters
The following section is available when Message Content is From Parameters.
The list of target Android devices to receive notifications. 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.
The registration ID is different for each unique Android device/application pair, so it cannot be shared between different applications. When configuring the GCMMessenger to work with a new application, new registration IDs must be acquired.
To register an Android application to the Google Cloud Messaging service, send a com.google.android.c2dm.intent.REGISTER intent. 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.
Additional data to send with the message.
Advanced Message Content Options
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 while it is turned off, the device will only receive the last message once it is turned on.
When set to True, messages will not be immediately delivered to Android devices when they are idle, but when they become active.
The amount of time for a message to be stored on GCM servers before it is discarded. When left unspecified, the default time is 4 weeks.
Application package name. This name restricts message delivery to applications on Android devices that match the package name.
When set to True, test without actually sending a message to target Android device.
Custom JSON Message Content
The following section is available when Message Content is From Custom JSON.
The JSON message to send.
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
Search FME Knowledge Center
Search for samples and information about this transformer on the FME Knowledge Center.