A python script to send GCM notifications for Android devices
Log in to your server with a sudo user.
- Update your package lists:
sudo apt-get update- Install the Python packages:
sudo apt-get install python-pip python-dev build-essential- Install python-gcm. Find out more about python-gcm here.
sudo pip install python-gcmfrom gcm import *: this imports the Python client for Google Cloud Messaging for Android
gcm: add your API KEY from the Google API project; make sure your server's IP address is in the allowed IPs
registration_ids: add registration_ids of your Android devices to whom you would like to send notifications
Check logs for any kind of errors