{"_id":"574406149a2c890e002834fb","parentDoc":null,"user":"54eb4fdedf7add210007b29b","__v":5,"project":"54eb50e5615ffc1900305a16","version":{"_id":"54eb63b859b1172100334fae","project":"54eb50e5615ffc1900305a16","forked_from":"54eb63a1867e1917009b711d","__v":28,"createdAt":"2015-02-23T17:30:32.501Z","releaseDate":"2015-02-23T17:30:32.501Z","categories":["54eb63b959b1172100334faf","54eb63b959b1172100334fb0","54eb63b959b1172100334fb1","54eb63b959b1172100334fb2","54ed8dd4ab373e2300f50eae","54ed99b2ab373e2300f50ede","55153a6de68daa2f00cff838","551546edbc466623002afe72","5515472ac28d6125001b8884","55154749c28d6125001b8885","555d9b4106dfec0d00d38ea7","5613e06e433e5735007c7708","5624bbb785a31117001c5403","56669e857cc81e0d00253f8e","568b8d837a42220d00498311","56a632277ef6620d00e2f18a","56d8147c3eb4dd0b00201aac","57a9ce2fac6db30e000d7efd","57a9cf4e944ea60e00dc3f74","58172386715dce0f00da4aa0","582dc59ee1b8692300c0dd03","589b19b4fec2730f0082e040","58b04a023529383900a759b5","58b92d1598157a0f004869bf","592e7685c58275000f20174f","59392839e376d4002f8a0474","59393064e376d4002f8a05a1","5947ae0d4005e2000f3a4fec","594a74df1d1de5001ab3517a","5954bc387a147f001b918915","59b8eeeb707542001076d3b6"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"category":{"_id":"57a9ce2fac6db30e000d7efd","__v":0,"project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-08-09T12:35:59.736Z","from_sync":false,"order":8,"slug":"push-messages","title":"Push messages"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-05-24T07:43:16.224Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":5,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Configuring your application for Push Notifications over Google Cloud Messaging\"\n}\n[/block]\nGoogle Cloud Messaging is a service which allows Infobip to send Push Messages from the Infobip server to your users’ Android-powered devices. You will need to create and configure the project at Google Developers site in order to enable Push Notifications for your applications.\n\n1. Go to [Google Developers](https://developers.google.com/mobile/add) and start creating your application project. First you will need to choose a platform for Push configuration.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/iR96HjwRTpekueEUVOVH_gcm_platform.png\",\n        \"gcm_platform.png\",\n        \"609\",\n        \"386\",\n        \"#2898b9\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n2. Choose \"Enable services for my Android App\".\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/xOqAEqcaTuS7b9w29Lsq_gcm_pick_platform.png\",\n        \"gcm_pick_platform.png\",\n        \"606\",\n        \"317\",\n        \"#4c9bae\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n3. On the next screen you will need to choose a new name for your project and also provide an Android package name of your Android application. You can also change the default settings such as sharing you data with Google and your country/region. After you're done with settings, just press **`Choose and configure services`**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/gzKYTL0JT1emt7q2pFrg_gcm_create_app.png\",\n        \"gcm_create_app.png\",\n        \"605\",\n        \"549\",\n        \"#5796a7\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n4. You will need to pick the **Cloud Messaging** service from the list of services available for your application.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/PXVRkiURyq5BtPL3UvIx_gcm_cloud_msg.png\",\n        \"gcm_cloud_msg.png\",\n        \"603\",\n        \"542\",\n        \"#718ba1\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n5. Then just press **`Enable Google Cloud Messaging`**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/czyxxiB3RZqmR3JrFa97_gcm_enable_cloud.png\",\n        \"gcm_enable_cloud.png\",\n        \"603\",\n        \"486\",\n        \"#738c9b\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n6. After that you will have your Server API Key and Sender ID.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/fsvrMSnRSVacTPgy91pK_gcm_serverAPI.png\",\n        \"gcm_serverAPI.png\",\n        \"608\",\n        \"448\",\n        \"#65bb6d\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Obtaining Google Cloud Messaging credentials for an existing project\"\n}\n[/block]\nIf you already have your project set up on the Google developers site, you can just follow the same steps and pick existing project name and Android package name. Then you will see a list of services for your project with Cloud Messaging enabled. You will need to press \"Generate configuration files\" on that screen.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/0LbgOcYRTCBixi8PZQFg_gcm_generate_conf.png\",\n        \"gcm_generate_conf.png\",\n        \"607\",\n        \"386\",\n        \"#18b1d2\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nYour Google Cloud Messaging Server API Key and Sender ID will be available on the next screen.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/U5KAJypbTeWmLvP6HmRo_gcm_apikey.png\",\n        \"gcm_apikey.png\",\n        \"605\",\n        \"264\",\n        \"#489ab9\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n------ \n### **Next:** [Create Push application](doc:push-introduction-create-app)","excerpt":"This page will show you how to activate and configure the GCM cloud.","slug":"gcm-setup","type":"basic","title":"GCM Server API-Key Setup Guide"}

GCM Server API-Key Setup Guide

This page will show you how to activate and configure the GCM cloud.

[block:api-header] { "type": "basic", "title": "Configuring your application for Push Notifications over Google Cloud Messaging" } [/block] Google Cloud Messaging is a service which allows Infobip to send Push Messages from the Infobip server to your users’ Android-powered devices. You will need to create and configure the project at Google Developers site in order to enable Push Notifications for your applications. 1. Go to [Google Developers](https://developers.google.com/mobile/add) and start creating your application project. First you will need to choose a platform for Push configuration. [block:image] { "images": [ { "image": [ "https://files.readme.io/iR96HjwRTpekueEUVOVH_gcm_platform.png", "gcm_platform.png", "609", "386", "#2898b9", "" ] } ] } [/block] 2. Choose "Enable services for my Android App". [block:image] { "images": [ { "image": [ "https://files.readme.io/xOqAEqcaTuS7b9w29Lsq_gcm_pick_platform.png", "gcm_pick_platform.png", "606", "317", "#4c9bae", "" ] } ] } [/block] 3. On the next screen you will need to choose a new name for your project and also provide an Android package name of your Android application. You can also change the default settings such as sharing you data with Google and your country/region. After you're done with settings, just press **`Choose and configure services`**. [block:image] { "images": [ { "image": [ "https://files.readme.io/gzKYTL0JT1emt7q2pFrg_gcm_create_app.png", "gcm_create_app.png", "605", "549", "#5796a7", "" ] } ] } [/block] 4. You will need to pick the **Cloud Messaging** service from the list of services available for your application. [block:image] { "images": [ { "image": [ "https://files.readme.io/PXVRkiURyq5BtPL3UvIx_gcm_cloud_msg.png", "gcm_cloud_msg.png", "603", "542", "#718ba1", "" ] } ] } [/block] 5. Then just press **`Enable Google Cloud Messaging`**. [block:image] { "images": [ { "image": [ "https://files.readme.io/czyxxiB3RZqmR3JrFa97_gcm_enable_cloud.png", "gcm_enable_cloud.png", "603", "486", "#738c9b", "" ] } ] } [/block] 6. After that you will have your Server API Key and Sender ID. [block:image] { "images": [ { "image": [ "https://files.readme.io/fsvrMSnRSVacTPgy91pK_gcm_serverAPI.png", "gcm_serverAPI.png", "608", "448", "#65bb6d", "" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "Obtaining Google Cloud Messaging credentials for an existing project" } [/block] If you already have your project set up on the Google developers site, you can just follow the same steps and pick existing project name and Android package name. Then you will see a list of services for your project with Cloud Messaging enabled. You will need to press "Generate configuration files" on that screen. [block:image] { "images": [ { "image": [ "https://files.readme.io/0LbgOcYRTCBixi8PZQFg_gcm_generate_conf.png", "gcm_generate_conf.png", "607", "386", "#18b1d2", "" ] } ] } [/block] Your Google Cloud Messaging Server API Key and Sender ID will be available on the next screen. [block:image] { "images": [ { "image": [ "https://files.readme.io/U5KAJypbTeWmLvP6HmRo_gcm_apikey.png", "gcm_apikey.png", "605", "264", "#489ab9", "" ] } ] } [/block] ------ ### **Next:** [Create Push application](doc:push-introduction-create-app)