Git Product home page Git Product logo

hellogcm's Introduction

HelloGCM

A really simple example to demonstrate how to use GCM

Steps to use the example project:

  1. Create a google-services configuration file here. Insert the package name as "com.alphabet7.hellogcm" if you don't change the package name in this project.
  2. Save your SENDER_ID and SERVER_KEY informations.
  3. Download the google-services.json file then save it to the /app folder.
  4. Insert your SENDER_ID at the GcmRegistrationIntentService.java.
  5. Run the project, check the Android Monitor, and wait for the Registration Token to appear in the Log.
  6. Use postman with the template here, and insert your SERVER_KEY and DEVICE_REGISTRATION_TOKEN/ID in the Body and Header. Alternatively, you can also use this website, insert the SERVER_KEY, DEVICE_REGISTRATION_TOKEN/ID, and this message: {"content":"Congratulations, GCM push success"}. Then click Submit/Send.
  7. The push notification will appear on your device.

HelloGCM (Bahasa Indonesia)

Contoh sederhana untuk menggunakan GCM (Google Cloud Messaging)

Langkah-langkah untuk menjalankan project ini:

  1. Buat file konfigurasi google-services di sini. Masukkan package name-nya sebagai "com.alphabet7.hellogcm" jika kamu tidak mau merubah package name pada project ini.
  2. Simpan data SENDER_ID dan SERVER_KEY yang diberikan.
  3. Unduh file google-services.json kemudian simpan di folder /app project ini.
  4. Masukkan data SENDER_ID kamu pada GcmRegistrationIntentService.java.
  5. Run project ini, buka Android Monitor, kemudian tunggu sampai Registration Token Device-nya muncul di Log.
  6. Gunakan Postman dengan template berikut, lalu masukkan data SERVER_KEY dan DEVICE_REGISTRATION_TOKEN/ID-nya pada Body dan Header. Selain cara itu, kamu juga bisa menggunakan website ini, masukkan SERVER_KEY, DEVICE_REGISTRATION_TOKEN/ID, dan message ini: {"content":"Congratulations, GCM push success"}. Lalu klik Submit/Send
  7. Push Notification akan tampil di device kamu.

hellogcm's People

Contributors

gentra avatar

Stargazers

Iksandi Lojaya avatar

Watchers

James Cloos avatar

Forkers

jokosu10

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.