4

looking for some Grails Plugin that implement the push notification for android.

I am already using apns for Iphone, but now I have to implement it for android! any suggestion?!

Arthur Neves
  • 11,840
  • 8
  • 60
  • 73

1 Answers1

3

The server side of C2DM is simple and I guess that's the reason, why there is no plugin.

You just need to get an auth token and then do an http post request to the google C2DM server in oder to push your message

http://android-developers.blogspot.com/2010/05/android-cloud-to-device-messaging.html

but there seems also to be a java library which can be used in groovy/grails:

http://www.openintents.org/en/node/724

here you'll find some more details on how to push the messages:

http://code.google.com/intl/de-DE/android/c2dm/#server

Sample Java Code can be found here:

http://code.google.com/p/jumpnote/source/browse/#svn%2Ftrunk%2FJumpNoteWeb%2Fc2dm%2Fcom%2Fgoogle%2Fandroid%2Fc2dm%2Fserver

But I guess you'll be able to create your own groovy code with less lines... :-)

rdmueller
  • 10,742
  • 10
  • 69
  • 126
  • 1
    mainly this last one was the one that I was looking for! thank you! I am wondering to right a grails plugin to encapsulate it! – Arthur Neves Jun 17 '11 at 04:12
  • I'm glad that this was helpful. Hope you'll publish your plugin :-) can you please make sure to click on the bounty icon besides my answer in order to assign me the bounty? Thanx! – rdmueller Jun 17 '11 at 05:26