Node as GCM client - android

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.

Related

XMPP GCM Android implementation guidance

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.

Implementing a chat application server for clients on Android/Windows Phone

I need to implement a group chat server which can support more than 50 users at a time.
The users will be only on mobile clients which include Android/Windows Phone.
Sending push notifs to the apps will not be difficult, as the server needs to do a basic curl request. So "polling" is not an issue.
My current skill set includes.
Flask
Google App Engine( I intent to use it or a web hosting
server.)
Basic php
So from what I know, I can make http requests to the server with user specific information+chat msg.
The server processes this and sends a broadcast using push notifs to all the devices stored in database.The server identifies the device from the data in the http request.
How efficient will this be?
If this is not the correct approach, what all do I need learn(sockets programming?) and any framework which can make my work easier (it will help if it is also supported on GAE).
I think you need XMPP messaging. It's support by App Engine but not in PHP : https://developers.google.com/appengine/features/
XMPP permit to send and receive chat messages.

GCM server direct from android app

I am creating a chat application on android using GCM. I'm already able do receive messages from the cloud and to send them manually through a PHP script using cURL. I can simple make an HTTPRequest to this script everytime a user send a message but I would like to know if there's a way to remove this script thus making the android app directly send the message to the cloud. If this is possible I also would like to know if it is the "right" way to do it or if the HTTPRequest is as good as it.
Thanks in advance.
Not really. GCM is not meant to replace your entire infrastructure, just the push channel from your servers to the clients.
That said, there is this concept of Upstream Messaging (from device to Google's servers) but Google's servers then contact your servers (via XMPP of all things) to let you decide what to do next.
You cannot do device-to-device over GCM.

Android Push - Third party server can't log in Google GCM to be whitelisted

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.

GCM client for Desktop

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 :)

Categories

Resources