To set up push notifications for Android devices and to enable push for Cordova
applications for Android, you must use the Google Cloud Messaging (GCM) service. In order to use
GCM, you need a valid Google account.
Procedure
- Gather the following information about your Google API project from Google Developers Console
(http://code.google.com/apis/console):
- Project number
- The project number is a globally unique numerical value created when you create your Google API
project. Be careful not to use either the project name or project ID as the
senderID value.
You can find the project number in the Google Developers Console
dashboard by expanding your project and recording the value under Project
number.
- Server key
- Make sure that the server key is not restricted to any specific URL. For more information about
how to create the key, see API
keys.
You can get your server API from Credentials page in Google Developers Console by
selecting .
- If your organization has a firewall that restricts the traffic to or from the Internet, you
must do the following steps:
- Configure the firewall to allow connectivity with GCM in order for your GCM client apps to
receive messages. The ports to open are 5228, 5229, and 5230. GCM typically uses only 5228, but it
sometimes uses 5229 and 5230. GCM does not provide specific IP, so you must allow your firewall to
accept outgoing connections to all IP addresses contained in the IP blocks listed in Google's ASN of
15169. For more information, see Implementing an HTTP
Connection Server.
- Ensure that your firewall accepts outgoing connections from IBM MobileFirst Platform Foundation push
notification service to android.googleapis.com on port 443.
- You can set the certificates using any of the following methods:
- To set up Google Play Services in your Android project, see https://developers.google.com/android/guides/setup.