A common requirement for a lot of apps is to use push notification. One of the solutions to providing this is Urbanairship, which is supported by FeedHenry. The following steps will show you how to integrate Urbanairship services with your apps.
To begin with, you first need to setup a new Urbanairship application.
Click here to create a new account.
Login to your Urbanairship account, click on "Apps". On this page, you will see a section "Add a new application".
You need to specify the name of the app, select the application mode, and then tick "Push Notification Support". This will expand the form with more fields to fill.
At the moment, Urbanairship supports push notification services for iOS, Android and Blackberry. Each of the platform requires different resources and they need to be uploaded here. For more details of how to get those resources, please read the UrbanAirship documentation. You can add those resources later if you haven't got them yet. You don't need to add any code to you application at the moment.
Once it's done, your Urbanairship application should be like this:
Create a FeedHenry application
We have an example application to demonstrate how to use $fh.push API inside your application. You can create a new FeedHenry application by clone/fork this app from here: PushNotificationTester
After creating the app, you will see the "Push Notification" link on the navigation bar on the left hand side. Click on it and you will see this page:
In Urbanairship, one application can only be used either for development or production. Each one will have its own set of keys. You need to enter those keys into this form. The "Package ID" field is a readonly field and its value will be used for applying C2DM service for Android.
The app itself is well documented. You can have a look at the comments if you have any questions. You can find the documentation of $fh.push API from here.
Next, build the app. Depends on the settings, you can build the app for iOS, Android or Blackberry. (Note: Push Notification for Android is only enabled for 2.2 and above) Install the apps to the devices.
To test, inside the app, first click on "Register Push Notification" button. Depends on the platform, you may be prompted for permission to allow the app to use push notification. Then, you can click on "Broadcast Message" button, wait for a few seconds, you will get your first push notification message!