+

Search Tips   |   Advanced Search

Set up push notifications for Android

To set up push notifications for Android devices, we must use the Google Cloud Messaging (GCM) service. To use GCM, we need a valid Gmail account.

  1. Create a Gmail account.

    1. Open the GCM web page: http://developer.android.com/google/gcm/gs.html.

    2. Open the Google APIs Console page. If we have not done this previously, you will be asked to create a project. The project has an ID; this is the senderID value that we use in application-descriptor.xml.

    3. Click the option to create a new key, and choose the option to create a browser key. The generated key is the key value that we use in application-descriptor.xml. When creating the browser key, do not restrict it to any specific URL.

  2. From MobileFirst Server, ensure that ports 5228, 5229, and 5230 are open. Typically, GCM uses only port 5228, but it sometimes uses 5229 and 5230.

  3. Ensure that the firewall will accept outgoing connections to all IP addresses contained in the IP blocks listed in Google's ASN of 15169.

  4. In application-descriptor.xml, for <android> set the following attributes for the <pushsender> element:

    Attribute Description
    key The key value received from GCM.
    senderID The project ID received from GCM.

    Android OS 2.3.x devices must be synchronized with a Gmail account. Android OS 4.x does not impose account synchronization.


Results

Your push notifications setup is now complete.


Parent topic: Set up push notifications