{"__v":16,"_id":"5540e66b31827a0d007ab217","category":{"__v":15,"_id":"5540e5f131827a0d007ab212","pages":["5540e66b31827a0d007ab217","5540e67731827a0d007ab219","55ac917b5863b817008ae3b4","55acaa4c6b4ff90d00784a92","55acb96418eefd0d0071d553","55acc8aa18eefd0d0071d596","55accd2818eefd0d0071d5a8","55acd06518eefd0d0071d5b6","55acddd7fb7b3c19003739cc","55ace14bfb7b3c19003739d3","55ace3a9fb7b3c19003739d7","55acea24f93f0c0d005b880f","55acf15bf93f0c0d005b8821","55acf3cd18eefd0d0071d5fb","55d1f1c0486de50d00326f17"],"project":"5540ce1b31827a0d007ab1cc","version":"5540ce1c31827a0d007ab1cf","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-04-29T14:08:49.271Z","from_sync":false,"order":4,"slug":"android","title":"Android"},"parentDoc":null,"project":"5540ce1b31827a0d007ab1cc","user":"5540cdbf5cf9682100d61a97","version":{"__v":31,"_id":"5540ce1c31827a0d007ab1cf","project":"5540ce1b31827a0d007ab1cc","createdAt":"2015-04-29T12:27:08.390Z","releaseDate":"2015-04-29T12:27:08.390Z","categories":["5540ce1c31827a0d007ab1d0","5540d91bbb9e762d00f594ad","5540e5f131827a0d007ab212","5540e5febb9e762d00f594d3","5540e61331827a0d007ab213","5540e6195cf9682100d61afa","5540e62631827a0d007ab214","5540e63031827a0d007ab215","5540e63531827a0d007ab216","5540e63e5cf9682100d61afc","5540e6445cf9682100d61afd","5540e64a5cf9682100d61afe","55a4ff5b2e70c0250038050f","55acb28318eefd0d0071d504","55ae1abe8576b92300291c80","55ae453ef302af23000ac109","55af586d555b900d0036d296","55af91dac8a85321007a53c3","55b9fee204775a2f00628071","55b9ff0e04775a2f00628072","55b9ff4604775a2f00628073","55b9ff5fd72d1e1900276a38","55b9ff7f04775a2f00628074","55b9ff90eb08801900f833e5","55b9ffa5d72d1e1900276a39","55b9ffca04775a2f00628075","55b9fffdd72d1e1900276a3a","56bc2f033ee9e70d008b46af","56c2f6efbbf9ec2d00e0fe4f","57595bbb18760817001e8bbe","57d8d9793916800e003dde53"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":["58382982a746be0f00db6577"],"next":{"pages":[],"description":""},"createdAt":"2015-04-29T14:10:51.874Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":true,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Locate your Google Project Number\"\n}\n[/block]\nThe **Project Number** is automatically assigned by the Google Developers Console when you create a project. You can find the **Project Number** in the “Dashboard” tab of the [Google API console](https://code.google.com/apis/console/).\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/HmSwDDV3QB2MUP1i28wU_1.png\",\n        \"1.png\",\n        \"917\",\n        \"507\",\n        \"#3d7ae1\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nHere, **852741519435** is the **Project Number** you enter in the app. *Don’t confuse it with Project ID, which is a completely different identifier & is **used only within Developers Console!*** \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Enable GCM and Get Credentials\"\n}\n[/block]\n**1.** In the main Google APIs Console page, select API Manager.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/U6ZRHDwtS1uMJJTOp1Qm_2.png\",\n        \"2.png\",\n        \"917\",\n        \"567\",\n        \"\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n**2.** Locate and click Google Cloud Messaging in Mobile APIs section.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/1SnUcQmrSWihOUBnvHQc_3.png\",\n        \"3.png\",\n        \"876\",\n        \"421\",\n        \"#3e87dc\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n**3.** Enable API.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/hAGysYESqWfuuh0O9tHv_4.png\",\n        \"4.png\",\n        \"1165\",\n        \"432\",\n        \"\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nNow you need to create the **API key**.\n\n**4.** Go to the Credential section of the console, click \"Create Credentials\" and select API key\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/EbpaAoF6T2yFsdwMdJmP_5.png\",\n        \"5.png\",\n        \"870\",\n        \"552\",\n        \"#ed0a0b\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n**5.** Select a server key or a browser key. The advantage to using a server key is that it allows you to whitelist IP addresses.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/VT4tvcRvCKpYh0qI58iw_6.png\",\n        \"6.png\",\n        \"775\",\n        \"512\",\n        \"#cd0f0f\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": []\n    }\n  ]\n}\n[/block]\n**6.** Press “Create”.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/RiNjxJl1R7eiH0sM7WFu_7.png\",\n        \"7.png\",\n        \"889\",\n        \"525\",\n        \"#437cde\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n**7.** Here’s the API Key you will need to configure your application in Pushwoosh Control Panel.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/qT1hcDuHS7ym5exdzVga_8.png\",\n        \"8.png\",\n        \"729\",\n        \"383\",\n        \"#f80606\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nGo to the Pushwoosh Control Panel\n\n**8.** In your application click on Android->Edit to change the configuration for Android application.\n\n**9.** Copy your API Key to the field provided.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/Q6q1r281SCupPoOULRrU_save.png\",\n        \"save.png\",\n        \"1230\",\n        \"393\",\n        \"#043853\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nThat’s it! Easy, isn’t it?\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"MismatchSenderID error\",\n  \"body\": \"If you see “MismatchSenderID” errors in your Push History, please try the following:\\n* Use “Browser Key” instead of the \\\"Server key\\\";\\n* Check that the Google Project Number in your app matches the one in your Google Developers Console.\"\n}\n[/block]","excerpt":"Here’s what you have to do in order to enable the GCM service for your Android project","slug":"gcm-configuration","type":"basic","title":"GCM Configuration"}

GCM Configuration

Here’s what you have to do in order to enable the GCM service for your Android project

[block:api-header] { "type": "basic", "title": "Locate your Google Project Number" } [/block] The **Project Number** is automatically assigned by the Google Developers Console when you create a project. You can find the **Project Number** in the “Dashboard” tab of the [Google API console](https://code.google.com/apis/console/). [block:image] { "images": [ { "image": [ "https://files.readme.io/HmSwDDV3QB2MUP1i28wU_1.png", "1.png", "917", "507", "#3d7ae1", "" ] } ] } [/block] Here, **852741519435** is the **Project Number** you enter in the app. *Don’t confuse it with Project ID, which is a completely different identifier & is **used only within Developers Console!*** [block:api-header] { "type": "basic", "title": "Enable GCM and Get Credentials" } [/block] **1.** In the main Google APIs Console page, select API Manager. [block:image] { "images": [ { "image": [ "https://files.readme.io/U6ZRHDwtS1uMJJTOp1Qm_2.png", "2.png", "917", "567", "", "" ] } ] } [/block] **2.** Locate and click Google Cloud Messaging in Mobile APIs section. [block:image] { "images": [ { "image": [ "https://files.readme.io/1SnUcQmrSWihOUBnvHQc_3.png", "3.png", "876", "421", "#3e87dc", "" ] } ] } [/block] **3.** Enable API. [block:image] { "images": [ { "image": [ "https://files.readme.io/hAGysYESqWfuuh0O9tHv_4.png", "4.png", "1165", "432", "", "" ] } ] } [/block] Now you need to create the **API key**. **4.** Go to the Credential section of the console, click "Create Credentials" and select API key [block:image] { "images": [ { "image": [ "https://files.readme.io/EbpaAoF6T2yFsdwMdJmP_5.png", "5.png", "870", "552", "#ed0a0b", "" ] } ] } [/block] **5.** Select a server key or a browser key. The advantage to using a server key is that it allows you to whitelist IP addresses. [block:image] { "images": [ { "image": [ "https://files.readme.io/VT4tvcRvCKpYh0qI58iw_6.png", "6.png", "775", "512", "#cd0f0f", "" ] } ] } [/block] [block:image] { "images": [ { "image": [] } ] } [/block] **6.** Press “Create”. [block:image] { "images": [ { "image": [ "https://files.readme.io/RiNjxJl1R7eiH0sM7WFu_7.png", "7.png", "889", "525", "#437cde", "" ] } ] } [/block] **7.** Here’s the API Key you will need to configure your application in Pushwoosh Control Panel. [block:image] { "images": [ { "image": [ "https://files.readme.io/qT1hcDuHS7ym5exdzVga_8.png", "8.png", "729", "383", "#f80606", "" ] } ] } [/block] Go to the Pushwoosh Control Panel **8.** In your application click on Android->Edit to change the configuration for Android application. **9.** Copy your API Key to the field provided. [block:image] { "images": [ { "image": [ "https://files.readme.io/Q6q1r281SCupPoOULRrU_save.png", "save.png", "1230", "393", "#043853", "" ] } ] } [/block] That’s it! Easy, isn’t it? [block:callout] { "type": "danger", "title": "MismatchSenderID error", "body": "If you see “MismatchSenderID” errors in your Push History, please try the following:\n* Use “Browser Key” instead of the \"Server key\";\n* Check that the Google Project Number in your app matches the one in your Google Developers Console." } [/block]