Added my AndroidPushC2DMNotifier class to send push messages to android
apps. It's my contribution to iBuildings Challenge 2012.
merged branch PHPGangsta/AndroidPushC2DMNotifier (PR #61)

This PR was merged into the master branch.

Commits
-------

[33md9b100b[m Added my AndroidPushC2DMNotifier class to send push messages to android apps. It's my contribution to iBuildings Challenge 2012.

Discussion
----------

Added my AndroidPushC2DMNotifier class to send push messages to android

apps. It's my contribution to iBuildings Challenge 2012.

---------------------------------------------------------------------------

by llaville at 2012-04-19T06:32:00Z

@PHPGangsta Nice to see that there is another web service to push notification to Android phone device.
Do you know there is also NMA https://www.notifymyandroid.com/.

BTW, I may introduced my works to re-unified all notification systems to a simple solution that allow to write always the same code interface and choose to send to multiple targets (recipients).

This solution is new because, i've rewrote code from scratch for PHP 5.3, but the name is old : Net_Growl

The first approach of PEAR::Net_Growl (v2) is to send notification to compatible platform (MAC / Windows) only to UDP and GNTP protocols.

My new version V3 for PHP 5.3, allow to send notification to UDP, GNTP, SMTP, XMPP, HTTP.

This last one allow with specific connectors (already witten) to contact Android, iPhone and Windows Phone 7 via web service.

I've begin to write a presentation at http://growl.laurent-laville.org/v3/site/

As you'll perharps see it, it's extensible, and you can code your own connector to contact any other web service like C2DM : http://code.google.com/intl/fr/android/c2dm/index.html

Even if I continue to improve my work, the basic 0.4.0 version is already operational !

Laurent,

---------------------------------------------------------------------------

by PHPGangsta at 2012-04-19T08:31:13Z

@llaville Nice to hear that Net_Growl is being improved! Didn't know about NMA, seems to be a nice and easy app on the phone and some nice APIs.
My Notifier directly talks to Googles C2DM, no need for a webservice in between that intercepts the messages. And it's so easy that I like directly talking to Google instead of some other webservice that I don't know and don't trust.

Maybe you can think of implementing C2DM directly into Net_Growl, too.

Michael

---------------------------------------------------------------------------

by llaville at 2012-04-19T09:12:56Z

@PHPGangsta Of course it's possible to integrate a special connector for C2DM, Michael !

I marked it in my TODO list, but I've other priorities such as finished the documentation to help users that would like to use the new Net_Growl solution.

Laurent

---------------------------------------------------------------------------

by fabpot at 2012-04-22T07:55:37Z

This should go into the Contrib/ sub-directory.

---------------------------------------------------------------------------

by lyrixx at 2012-09-28T23:12:02Z

@PHPGangsta Can you move your class to `src/Sismo/Crontrib/AndroidPushC2DMNotifier.php` ?

Thanks.

---------------------------------------------------------------------------

by PHPGangsta at 2012-09-29T11:01:14Z

Moved the file to Contrib/ directory. Sorry, did not get the comment 5 months ago.

---------------------------------------------------------------------------

by lyrixx at 2012-09-29T11:26:28Z

@PHPGangsta No problem. Sorry, but I miss some issue in your code.

* Can you remove all debug code (`var_dump`, commented code)
* Can you rebase and squash your commit againt master

Thanks

---------------------------------------------------------------------------

by PHPGangsta at 2012-09-29T11:38:46Z

@lyrixx I removed debug code. Can you please tell me how I do a rebase and squash against master? Never done that.

---------------------------------------------------------------------------

by lyrixx at 2012-09-29T12:01:01Z

@PHPGangsta yes, of course. Here, is the doc for rebase the upstream : http://symfony.com/doc/current/contributing/code/patches.html#rebase-your-patch

And then to squash your commit : http://symfony.com/doc/current/contributing/code/patches.html#rework-your-patch

to make it simple :

git remote add upstream https://github.com/fabpot/Sismo.git
git fetch upstream
git co AndroidPushC2DMNotifier
git rebase upstream/master
 # (I think there are no conflits)
git rebase -i HEAD~5 # (I am not sure about 5, depends on your history)
 # Read the squash section (but rename `pick` by `squash` for all your commit, except the first one)
git push origin AndroidPushC2DMNotifier -f

"Et voila"

Thanks, again.

---------------------------------------------------------------------------

by PHPGangsta at 2012-09-29T12:11:06Z

Done, thanks for your help!

---------------------------------------------------------------------------

by lyrixx at 2012-09-29T12:15:10Z

@PHPGangsta Thanks ;)

@fabpot It seems good.