Push Notifications Tutorial (Pubnub/Urban Airship)?

Hi guys,
I’ve been trying to add push notifications in my app and after searching this site (and docs) extensively I noticed it seems Corona has added PubNub or UrbanAirship service.

The only problem right now is when I try to find a way to implement it at my app I’m totally lost and couldn’t find any thread or docs that discuss it especially for beginners like me.

Is there any good tutorial on this? Is PubNub better (from pricing pov) than Urban Airship?

Thanks [import]uid: 76697 topic_id: 26487 reply_id: 326487[/import]

Hi yanuar,

PubNub and Urban Airship are fundamentally two different services. PubNub is designed for in-app real-time messaging generally used while the app is running (for syncing players in a game, chat apps, syncing phones with TV shows, etc). PubNub uses a “Publish/Subscribe” model that let’s you publish the same data to every phone simultaneously. With PubNub, you can do things like:

* publish data to all online users that everyone will receive at the same time. (this can be used to share the location of players in a game, for example).

* publish data between phones (for example, a one-to-one chat between app users)

* publish data to an individual phone when a server needs to push data quickly to a phone (like announcing a reward or achievement to a user).

Data that is pushed using PubNub typically is received in under 100 milliseconds.

There are some sample Corona apps here: https://github.com/pubnub/pubnub-api/tree/master/lua-corona

On the other hand, Urban Airship is generally used as a traditional “push notification” service to “wake up the phone” when a user has the phone in their pocket or they are using a different app. Though you can get the same functionality by directly using Apple’s APNS and Andoid’s C2DM service, Urban Airship makes that integration a bit simpler. [import]uid: 150318 topic_id: 26487 reply_id: 107461[/import]

thanks todd for the explanation, that was very helpful, I also found a blog here on push notifications that explains quite alot.
I found a similar service such as UrbanAirship by the name PushWoosh, it even already has some documentation on how to implement it in Corona SDK.

I wonder why no one ever mentioned it before here?

[import]uid: 76697 topic_id: 26487 reply_id: 107827[/import]