Code Monkey home page Code Monkey logo

android_gcm's Introduction

Android GCM

Caution: Project is very hacky at the moment.

This is just a sample Android application having push notifications. It shows a toast message and notification when it receives the push notification.

The file gcm_server.py can be used to send messages to the application.

HOWTO

  1. Configure the application in your editor (preferably Eclipse), add libs/gcm.jar to your buildpath
  2. Change the SENDER_ID attribute in src/com/dhruvb/myapplication/CommonUtilities.java to your Google OAuth project id. Its usually in the URL https://code.google.com/apis/console/?pli=1#project:<your_project_id_is_this>:access
  3. Start the application in debug mode, the logcat output will print a device registration id, this id is used by the gcm server to send messages.
  4. Do a pip install python-gcm
  5. Change the API_KEY attribute in gcm-server.py.
  6. Run the script as python gcm-server.py -r <registration-id> -m '<message here>'

Refer: https://developer.android.com/google/gcm/gs.html for more clear instructions to get SENDER_ID and API_KEY

android_gcm's People

Contributors

dhruvbaldawa avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.