Is there any way to login into a GCM server and receive messages from a Desktop Windows C++ application? I want to be able to login into my GCM server using some kind of C++ GCM client.
Thanks in advance,
GCM Client
SEE ALSO
Getting Started GCM Server A GCM client is a GCM-enabled app that runs
on an Android device. To write your client code, we recommend that you
use the new GoogleCloudMessaging APIs. The client helper library that
was offered in previous versions of GCM still works, but it has been
superseded by the more efficient GoogleCloudMessaging APIs.
A full GCM implementation requires both a client implementation and a
server-side implementation. For a step-by-step guide to creating a
complete sample implementation that includes both client and server,
see Getting Started.
I think it is designed for android device.
Probably you can hack and install a whole android somewhere but, buy is easier in this way:
Write an Android client as google expect to a cheap phone (20$) When you receive message send it over wifi to your desktop Apache server via HTTP POST, and problem solved, simple :)
Related
I have been working on GCM xmpp implementation for my chat functionality, but about a week, I am not getting online help to start with , I have got this XMPP GCM Android tutorial, but I see xmpp is not fully implemented, and upon seeing their code, it is very unclear to understand the functionality
firstly. my current structure is
Android client app for chat functionality.
java backend, app server jboss hosted in openshift cloud platform.
and according to this google gcm-xmpp image.. I see client interacts directly to gcm, which I get confused, intern gcm connects app server.
as per my implementation, I get gcm regid from gcm and send http request to app server which intern send notifications to client devices through gcm. this is reverse of what we see with gcm flow diagram
secondly, since I have already set up app server Jboss, which can handle http request for my client request other than chat functionality. now I need to implement xmpp for handling asynchronous, bidirectional, upstream messaging with another servers like openfire or ejabberd which supports xmpp.
currently I am in state where I don't know how to start with xmpp, I have got above queries, in the hope getting some directions to start with.
I need to test GCM communication as well as some other network related tasks. I would like to run a node.js script that would do some requests and (I hope it's possible) receive gcm messages as a GCM client i.e. identically like an Android app. I know I can have GCM client on Android, IOS, Chrome App, but are there any libraries for such a functionality on node? If not, how can I test multiple gcm clients without actually using Android?
Thank you for any responses!
Edit: one possible solution I see it's to user Chrome WebApp as a proxy between my node.js client and gcm server.
I am trying to test the new Android GCM API.
In the client side, everything goes good. The application can register and unregister itself properly.
In the third party server I have issues. I am testing it using the Python example server that Google provides but it can't authorize the connection with Google GCM because the project is not whitelisted. I have tried to whitelist it through this website but it always returns a 500 error.
Also, I don't want to use upstream messaging at this moment but just send messages from the server to the devices. Do I still need to be whitelisted? In that case, is there any other Google resource to do that?
You don't need to whitelist your Google API project if you are not using user notifications or Cloud Connection Server. The Python example is for Cloud Connection Server, and you don't need it for simply sending messages from your server to your app. Use the simpler HTTP API.
You can read here about GCM HTTP Connection Server.
I have a project to develop an application that implements push technology. I can save the message to a database when I add some message, but my problem is that I can't send (broadcast) the message to the client and I can't implement the client accepting the message (accept broadcast message).
I'm using Spring, Hibernate, and Tomcat for the server, and I've built the client on Android.
I have tried all the links in this question, but I'm still confused about how to implement the source code.
For GCM, an explanation is available here.
For this you need to get an API key for your project from the API console.
Also, you need the Google Cloud Messaging for Android Library which will be available in your Android SDK/extras directory.
And if you are looking for both client & server side examples with explanations, they are explained nicely on this blog.
I am trying to create a chat application. The communication is based on RESTful web services(Jersey). The client communicates with the server sending HTTP requests. My problem is how to send messages from server to client without the client send a request first. I read about C2DM notifications, I suppose using this way, when the client receives the notification from the server then (the client) has to send a request to the server in order to receive the data. I also was thinking about using sockets but I don't know if it is possible as I am using Rest. I mean in the server side can I also use sockets(sockets run in lower level) with the REST code? The only thing I have though that could work using sockets is to create another server with socket(two servers RESTful and socket), but is this a good solution? Also could I put some server code in the client side and some client code in the server side. Would it be correct and effective? What do you think? Which solution would be the best?
C2DM has been officially deprecated as of June 26, 2012 by google. Existing C2DM developers are encouraged to migrate to the new version of C2DM, called Google Cloud Messaging for Android (GCM).
Check out this link for more info
http://developer.android.com/guide/google/gcm/index.html
The scenario you describe sounds ideal for C2DM. If you build your own sockets set up you will drain battery and CPU resources doing something the phone is already doing - maintaining an open socket to receive messages.
C2DM is relatively straightforward to set up, and in my experience is pretty reliable.
This is the best tutorial I have seen on it:
http://www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html
But you also need to read the official docs:
http://code.google.com/android/c2dm/
Your server-side code will need to send an HTTP request to the C2DM servers to send a message to a device. To tell it where to send the message, your server needs to specify the Registration ID (which represents your app running on one specific device) and so when your app sets up on the Android device, it registers with C2DM, and then needs to send its C2DM Registration ID to your server to be stored, ready to be used to send messages to.