简体   繁体   中英

How to implement XMPP Server and communication with GCM on Android?

I am developing in Android for GCM. I want to implement like the following:

Phone Server <--> GCM Server <--> Phone Client

I have try to use Http post to the GCM Server , and the client can receive the broadcast data from Http Server .

But the client seems can not upstream the message to the Server via GCM by using Http .

So it need to use XMPP Server on Android side for receive the upstream message from Client. But it seems few information about this.

How to implement XMPP Server and communication with GCM on Android ?

Thanks in advance.

You may implement an XMPP Server through Google Cloud Messaging (GCM) Cloud Connection Server (CSS) is an XMPP endpoint that provides a persistent, asynchronous, bidirectional connection to Google servers. The connection can be used to send and receive messages between your server and your users GCM connected devices.

Implement the XMPP Connection Server can receive upstream messages from a user's device to the cloud. To initiate an upstream message, client app must send a request containing the address of the receiving app server, message data comprising the key/value pairs of the message's payload and a message ID should be unique.

Here's a useful documentation on how to Implement an XMPP Connection Server: https://developers.google.com/cloud-messaging/ccs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM