Configure GCM for project The City


I assume that you already create new project on , If not you can read THIS and please check your enabled API :


[IMPORTANT ] Obtain Server API_KEY :

These API KEY from will no longer work. You need to go to and import your existing GCM project.

Then go to Project Settings -> Cloud Messaging, and get the new updated API Key. The “Sender Id” should be exactly the same number as your existing “GCM Project Number”.

So now you have :


API_KEY : AIzaSyAf8YTqLUtOQcr7l7n5g4……..



  Android           : please open java file data/ and change PROJECT_API_NUMBER with PROJECT_NUMBER_ID from point 1.

  Admin Panel  : please open php file app/services/api.php and change GOOGLE_API_KEY with API_KEY from point 1.



Please make sure your point 1, and point 2 done before go to testing step.

a. REGISTERING DEVICE. Registering device to your server, device will start regsitering device to your server at splash screen, if there’s circle progressbar at the bottom screen that mean device on process get gcm_id from your device and send to your server, If success device will not do this process again at the next.

If you want to activate this process again you can clear data the app ( Android Setting > App > The City > Clear Data ).

b. MAKE SURE DEVICE REGISTERED. To make sure your device succes registering to your server you can go to phpMyAdmin panel from your server side, and delete your device from gcm table. And open again The City App from your device. If your device success registered it will shown on the top of list, and then you GCM is ready to use.

Leave a Reply

Your email address will not be published. Required fields are marked *