Skip to content

Python Application for Google Cloud Messaging for Android (GCM).

License

Notifications You must be signed in to change notification settings

Ligio/python-mysql-gcm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-mysql-gcm

Build Status

Python client for Google Cloud Messaging for Android (GCM)

Google GCM doc

RTFM here

Project Description

This is a Fork of python-gcm [https://github.com/geeknam/python-gcm]. Python-gcm library by geeknam is a single part of the Server Application you need to send messages with Google Cloud Messaging. With this fork you can create the database to store deviceIds and you'll have the ability to send broadcast messages to all devices.

Setup

  • create a mysql database and import the script setup_mysql.sql (this script will create mysql tables for you!)
  • open the file gcm/gcm_setup.py and change settings with your mysql and GCM credentials

Usage

Now, your database has 2 tables:

  • Push_Android (you've to collect devices registration Id here)
  • Push_Android_Check (utility table to prevent too much push!)

You can register your device by manually insert registrationId into Push_Android table or you can implement your registration logic. You can now execute ./send_test_push.py to send a test push to your device!

If you execute ./push_gcm.py the script will check Push_Android_Check table and if it will find a record with 'on' status, the push will be sent to all enabled devices.

About

Python Application for Google Cloud Messaging for Android (GCM).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%