1. Creating a Google API Project:
- Open the Google Developers Console.
- If you haven’t created a project yet, click Create Project.
- Supply a project name and click Create. Once the project has been created, the Home's Dashboard page appears with your project ID and project number.
- Copy down your project number. You will use it later on as the GCM sender ID.
2. Enabling the GCM Service
- In the Home's Dashboard, under Use Google APIs click on Enable and Manage APIs.
- In the API Manager's Dashboard that opens, click on Enable API.
- In the displayed list of APIs, select the Google Cloud Messaging for Android.
- Now Google binds the push notifications with Firebase, click button "First Steps".
- Select "import a Google Project", choose a project to import and Add it to Firebase. Once time you have the project added, your API key is enabled.
3. Obtaining an API Key
- Come back to the API Manager's Dashboard, select Credentials in sidebar on the left.
- In the option of Create Credentials, select API Key.
- In the dialog, you can chose restrict this key, we do not recommend do it, but if you prefer, select Restrict Key.
- In the options showed, select IP addresses and type our server's IP address: 220.127.116.11 and 18.104.22.168. Remember we do not recommend restrict the key.
- And Save.
- In the refreshed page, copy the API key. You will need the API key later on to perform authentication in your application server.
Note: If you need to rotate the key, click Regenerate key. A new key will be created. If you think the key has been compromised and you want to delete it immediately, click Delete.
4. Login EMMA website and go to My Account > Apps and find your app.
5. Go to Configuration > Edit app, after select edit button on Android to start modificate your app info.
6. Enter the identifiers you get from the Developer Console in the Android CGM fields and save.