Firebase Cloud Messaging: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
m Created page with 'AKA GCM === sample gcm server === Web App that runs in Tomcat Sends a message to any registered Android devices that says "You got a message". WebContent/ index.jsp just loa…'
 
Brian Wilson (talk | contribs)
mNo edit summary
Line 1: Line 1:
AKA GCM
AKA GCM
http://developer.android.com/google/gcm/index.html
My understanding is this
* Mobile client sends message to GCM via XMPP
* GCM forwards message to 3rd party server (that's me).
* 3rd party server can send messages to clients via GCM server.
Advantages
* Google server can do store and forward so neither mobile nor my server need be online 100% of the time.


=== sample gcm server ===
=== sample gcm server ===

Revision as of 02:08, 26 May 2013

AKA GCM

http://developer.android.com/google/gcm/index.html

My understanding is this

  • Mobile client sends message to GCM via XMPP
  • GCM forwards message to 3rd party server (that's me).
  • 3rd party server can send messages to clients via GCM server.

Advantages

  • Google server can do store and forward so neither mobile nor my server need be online 100% of the time.

sample gcm server

Web App that runs in Tomcat

Sends a message to any registered Android devices that says "You got a message".

WebContent/

index.jsp just loads home via webmapping /home

WEB-INF/

lib/

  • gcm-server.jar -- sources are at the root level in the gcm code
  • json_simple-1.1.jar -- probably a json parser

Servlets

  • RegisterServlet -- accepts connections
  • UnregisterServlet --
  • SendAllMessagesServlet -- sends a message to all registered devices
  • HomeServlet - displays existing messages and allows sending a new one