Search code examples
androidandroid-c2dm

C2DM in development mode on android device


I can successfully send C2DM messages to my android emulator in "Local App Engine Connected Android App" development mode, but I am not able to do so when I connect a real android device, still in development mode. I get the old:

Failed to register/unregister ...

as the notification.

I use 10.0.2.2 as the web server address when I use an android emulator--and this works, should I do the same for a real android device?

Why can I get an emulated device to successfully register/unregister and receive c2dm, but not a real android device in debug mode?

Thanks.


Solution

  • You get the message when you send the notification, but you get it in the device or in the server app? If you are connected by wifi, make sure you are in the same network as the server, and use the server IP. 10.0.2.2 seems a "localhost" ip.