android - Sending Push/Update notifications to an Application via Python? -


i'm looking create simple push notification service android & ios able pretty simple tasks..

sending pure text application via python... how would/could done?

could me start, appreciated :)

you can refer link https://github.com/dhruvbaldawa/android_gcm

gcm_server.py can used send messages android application.

here gcm_server.py repo. script needs google oauth key. follow steps mentioned in repo

from gcm import gcm import argparse  # api key google oauth project api_key = ''   def send_push_notification(registration_id, message):     gcm = gcm(api_key)     resp = gcm.plaintext_request(registration_id=registration_id,                                  data={'message': message})   if __name__ == '__main__':     parser = argparse.argumentparser()     parser.add_argument('-r', '--reg-id', dest='registration_id', required=true)     parser.add_argument('-m', '--message', dest='message', required=true)     args = parser.parse_args()     send_push_notification(args.registration_id, args.message) 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -