android GCM

51 views
Skip to first unread message

Kartik Sudarshan

unread,
Jan 14, 2014, 12:53:03 PM1/14/14
to wncc...@googlegroups.com
Hi Junta
I am a newbie to android programming in linux(Ubuntu) but I want to start developing.
I wanted to try the android Google Cloud Messaging (GCM).
I went through its details on what all is required in the android developement page
The following are my doubts.
1.What is this  "3rd-party application server" that they are mentioning about
2.How do I generate and implement this application server
3.How do I link it to the GCM server

Thanks in Advance

Pritam Baral

unread,
Jan 14, 2014, 2:13:02 PM1/14/14
to wncc...@googlegroups.com
1) 3rd-party application server, in this case, would be a server you run/control. Like Facebook has their Android app, and they have their own servers.

This server is called "3rd-party" only because Google's own servers are in play, them being the "2nd-party".

The whole point of GCM is that your server doesn't have to have a connection open with all installations of your app just to send data to it occasionally. Imagine that happening with 10 different servers and 10 different apps for 10 corresponding services!

The thing with GCM is that Android has only one, highly optimized, connection to just one service/server: Google's. All the 10 different servers talk to GCM; GCM talks to Android, and Android talks to the corresponding app.

Each of those "10 different servers" is called a "3rd-party application server" in GCM's parlance.

2) Implementing one is very simple. You can do it any framework/language/platform of your choice, be it PHP, Rails, Python or even shell. The old/original way involves just HTTP requests. The new way, well-suited to high-volume publishing, involves XMPP connections. I think both are supported, but even if not, XMPP client libraries are mature and plenty. Look into the official docs.

3) Linking: I don't understand what exactly you mean here. If you mean sending data from 3rd-party server to Google's server, look above.

 

Regards,
Chhatoi Pritam Baral



--
--
The website for the club is http://stab-iitb.org/wncc
To post to this group, send email to wncc...@googlegroups.com
 
---
You received this message because you are subscribed to the Google Groups "Web and Coding Club IIT Bombay" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wncc_iitb+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

manideep polireddi

unread,
Jan 14, 2014, 3:56:20 PM1/14/14
to wncc...@googlegroups.com, wncc...@googlegroups.com

Just asking as you brought it up. Can we get data from GCM servers through our insti internet? Can android notifications (using GCM) be received while we are connect to insti internet?

Thanks in advance.

Regards,
Manideep Polireddi.

Sent using CloudMagic

Pritam Baral

unread,
Jan 14, 2014, 6:18:56 PM1/14/14
to wncc...@googlegroups.com

> Just asking as you brought it up. Can we get data from GCM servers through our insti internet? Can android notifications (using GCM) be received while we are connect to insti internet?

GCM uses ports 5222 & 5228. Neither is accepted by netmon.

Kartik Sudarshan

unread,
Jan 15, 2014, 9:45:50 AM1/15/14
to wncc...@googlegroups.com
Thank you

when I meant linking I meant how do I connect to the GCM server.
Correct me if I am wrong,the following is a setup idea if I want to use GCM :

Assume that I am running a group and I have made an app which just acts as a receiver for broadcast messages so :
1. I use a server ,say Ubuntu server, and I install Lampp/Xampp
2.I will write a php code /shell program that will take my message as input.Using HTTP I will send it to gcm server (lets say I am not in insti ).
3.The message will go to the android devices from the GCM server.

Pritam Baral

unread,
Jan 15, 2014, 10:49:01 AM1/15/14
to wncc...@googlegroups.com


> Assume that I am running a group and I have made an app which just acts as a receiver for broadcast messages so :
> 1. I use a server ,say Ubuntu server, and I install Lampp/Xampp
> 2.I will write a php code /shell program that will take my message as input.Using HTTP I will send it to gcm server (lets say I am not in insti ).
> 3.The message will go to the android devices from the GCM server.

That's right.

Reply all
Reply to author
Forward
0 new messages