Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android GCM push messages support #22

Closed
mac-cain13 opened this issue Mar 7, 2013 · 9 comments
Closed

Android GCM push messages support #22

mac-cain13 opened this issue Mar 7, 2013 · 9 comments
Milestone

Comments

@mac-cain13
Copy link
Owner

No description provided.

@christiaan
Copy link

Why should a push notifcation package support all platforms? Why not just write a simple library that does 1 job right in this case send push notifications to iOS?

It is really not that hard if you have 2 packages one for iOS and one for Android to write a simple wrapper yourself to either use the Android or iOS one depending on the user you're trying to send a notification to.

IMHO the business logic of your application should decide which notification should be send. Maybe even multiple to multiple devices of the same user.

@mac-cain13
Copy link
Owner Author

Christiaan, thanks for your thoughts on this! A notification package shouldn't implement all platforms per se, that's absolutely a valid point to bring up.

If there are already is a great PHP library to use for pushing to Android GCM I think Notificare should drop this feature and advice users to use that library. If there isn't I think it would be useful to add GCM support.

Do you know any good PHP libraries that I should consider?

Note that supporting GCM would not necessarily take the "what to use" decision away from the business logic, but that's something we should think about when implementing this.

@christiaan
Copy link

Recently I've ported the official Java Libraries for GCM to PHP, I was evaluating if it would be a good idea to use it together with this one.

https://github.com/Web-Power/GCMApplicationServer

On my search for a good enough quality iOS push package I came across a few which did both Android and iOS they worked but none felt "done" so I'd love to see this package be completely "done" for APN.

@mac-cain13
Copy link
Owner Author

Nice, will definitely take a look at your GCM port!
Not sure if I like the flexibility of using two completely different libs for GCM and APNS that have their own tricks and expertise or the ease of use when one library provides both GCM and APNS in a more or less consistent way. Will give that some more thought then I take your port for a spin.

Ps. Funny to see you live in Nijkerk, lived there for some time myself. :)

@christiaan
Copy link

Why not provide two separate libs for GCM and APNS that really expose everything you can do with those two services. AND then have a separate lib that provides a abstraction and uses those two libs.

@christian-kolb
Copy link

I would love a support for the GCM. The reason I don't use this library (or better it's symfony bundle version) is that it does not support GCM like the RMSPushNotificationsBunlde.

@christiaan
Copy link

This library supports logging, error handling, processing feedback from apple and is fully unit tested. Something the RMSPushNotifcations is lacking. The same goes for the library for Android I linked which has all the aforementioned features and handles back off requests by Google and does retries when it happens, something I haven't seen any other PHP library for android do.

Writing a bundle that provides a abstraction for the libraries is IMHO trivial. To demonstrate that I'll try to implement a bundle one of these days in my upcoming vacation.

@christian-kolb
Copy link

That's why I would like to use your bundle ; ) Let me know here when there's something to test.

@mac-cain13
Copy link
Owner Author

My plan is to integrate the GCM bundle that Christiaan created as an (optional) dependency, so Notificato would become that handy wrapper for all your push notifications.

But I have to say it's not high on my todo list, because implementing the two libraries in your application is probably as easy as using a wrapper. You often want to send slightly different messages to different platforms anyway, because Android is handling messages completely different and you have a lot more options to do extra stuff when you receive a message.

Anyway, good to know there are people searching for a bundle that can do both. It will give this issue somewhat more priority, so let me know if there are more people looking for Android support in Notificato.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants