且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将本地服务器上运行的appengine应用程序与GCM服务器连接起来

更新时间:2023-01-28 10:59:51

要发送消息到GCM服务器,您甚至不需要运行本地服务器。在本地计算机上运行的任何可以连接到互联网并发送HTTP POST请求的应用程序都可以向GCM服务器发送一条消息,该消息将发送到您的设备(假设您使用正确的注册ID)。



如果您希望Android应用程序将注册ID发送到本地计算机,则只需要本地服务器。



这意味着您可以在本地轻松测试大部分服务器代码,而无需设置本地服务器。


I have created client-server project to figure out GCM(Google Cloud Messaging) service. It is working well on my first try when i deployed :--

1)Android App to my device.

2)Appengine App to Appengine server.

But i am missing one thing what if i need to make changes to project mainly on appengine app. Every time i need to deploy to appengine server to test it whether its working properly or not. Its takes lots of time.

How to test LOCAL appengine server app (as server) with android DEVICE (as client) not emulator....?? I mean how aappengine application running on local server connects to GCM server (somewhere on WWW) resulting push notification on my android device...

To send messages to the GCM server you don't even need to run a local server. Any application running on your local computer that can connect to the internet and send an HTTP POST request can send a message to the GCM server, which will be sent to your device (assuming you use the correct registration ID).

You only need a local server if you want your Android app to send the registration ID to your local computer.

This means you can easily test most of your server code locally without setting up a local server.