Free up to 1MM monthly messages. No credit card required.
Push notifications enable you to send updates, alerts and new content to mobile devices even if that mobile device is offline. However, when it comes to building a push notification system for your application, unfortunately (for development sake), there’s not one universal smart phone with a universal operating system. Users have a wide variety of devices, running on a wide variety of operating systems, in a wide variety of environments. As a result, developers need a more powerful way to utilize notification services across every mobile device.
In this blog post, we’ll give you a tutorial on using both APNS for iOS devices and GCM for Android, as well as how to integrate PubNub Data Streams for push notifications. Each option has its own set of full documentation, so I’ll link you to the relevant documentation for each one after a brief overview. There are solid use cases for each push notification service, and we’ll go through the benefits and limitations of each as well.
Let’s get to it!
Last month, we announced that PubNub now supports GCM, enabling you to easily build GCM/Android push notifications into your PubNub application, streamlining cross platform message delivery, and eliminating the need to develop additional server-side components for GCM.
Essentially, PubNub is the provider between devices that are subscribed to your application and 3rd party sources. GCM is a great way to deliver one-way, non-critical communications with smaller payloads (128 bytes to 4KB).
PubNub also makes it easy to deliver push notifications to iOS devices including iPhones and iPads from your PubNub web or mobile application. Like GCM, APNS is one-way communication, but has a message size limit of 256 bytes per notification payload.
Check out the documentation with a full Objective-C tutorial for implementing APNS into your PubNub application. The tutorial includes an APNS architecture overview, how to set up an Apple and PubNub environment, and building and testing your APNS application.
For mission critical messaging, we encourage you to check out utilizing our PubNub Data Streams publish and subscribe APIs to implement push notifications. Some of the advantages PubNub Data Streams is:
Despite the advantages of the native PubNub approach, there are cases where a developer may choose to utilize APNS and GCM, for example:
As you can see, there are uses cases for each push notification service. But overall, push notifications are a great way to retain user engagement, keep users in the loop, and send important updates and alerts to users in real time. It really depends on the size of the message, whether you want bidirectional or one way communication, and what device you’re sending the push notification to.
Take a look at the top trends that are the most effective in attracting customers and reducing churn, and how you can incorporate...
Comparing the major game engines: Unity vs Unreal Engine vs Corona SDK vs GameMaker Studio, including the benefits and cons of...
Sockets (aka socket programming) enable programs to send and receive data, bi-directionally, at any given moment. This tutorial...