Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 844 Bytes

File metadata and controls

33 lines (21 loc) · 844 Bytes

Python-Android-GCM

A python script to send GCM notifications for Android devices

Step One - Set Up Python GCM Simple Server

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-gcm

Explanation:

from 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