Posts tagged: apns
Apache Camel is a rule-based routing and mediation engine providing implementation of Enterprise Integration Patterns. It allows message transfer from different sources to different destinations (see http://camel.apache.org/components.html for further details).
Playing around with Apache Camel i’ve decided to write a simple example sending push notifications to the iOS devices.
One option is to use original Camel’s Apns Component. This requires however your APNS provider has to be registered by Apple in order to send push notifications using generated certificate.
Another option is to use a free, public available APNS provider. In this example I’ll use Boxcar.IO as an APNS provider.
Boxcar allows you to create your own provider (= boxcar account) and send push notifications through it to the free Boxcar App installed on your iOS device. Alternatively (for testing or development purpose) one of the pre-configured, generic providers can be used (i’ll use generic “Monitoring” provider in this post).
Furthermore Boxcar exposes a very simple REST API containing only 3 RESTful requests: SUBSCRIBE, CREATE and BROADCAST. SUBSCRIBE will add your service for a user. CREATE sends a message to one user, or a subset of your users. BROADCAST sends a single message to all of your users.
Let’s prepare the iOS device for using Boxcar first.