Urban Airship

Table of Contents

Blackberry

BlackBerry 10 Support

Urban Airship now officially supports BlackBerry 10.  No changes were necessary on the server side to support this version, but due to the complete change in the BB10 operating system, new client integration libraries were required.

We’re pleased to announce that developers at RIM have written client libraries and provided a sample application to demonstrate how to get going with Urban Airship on BlackBerry 10.

For an excellent overview of the changes and details on how to getstarted, start here

For more information, please refer to the following resources:

Preparation

Every application must first be registered with RIM ;

During the signup process:

  1. Specify that you want the Push Essentials package.
  2. Specify an IP address that your main development workstation or office has access to.
  3. Mention that you are using Urban Airship in the notes.

Once your registration is processed, you’ll receive an email confirmation.

Blackberry-Specific Glossary

Application ID
Also referred to as the username or service ID, this is the unique identifier for the app in RIM’s system
Password
Each application has a password
Port
Each application gets an assigned port to use from inside the client application.
URL
Your app will be assigned a URL to push to. Every evaluation app uses https://pushapi.eval.blackberry.com , but production apps will have something like https://cp310.pushapi.na.blackberry.com

Client Side

For BB10, the following open-source client example is available from RIM:

For older OS versions, there are two client-side APIs you can use. For OS 4 devices, you can access the push port directly, and for OS 5 and 6 devices there is a push API. RIM provides client side example code, but it’s difficult to use, so we have two sample applications to help you get started:

Urban Airship Side

Create a new application or open an existing application the Urban Airship web application and enter in the BB Username/Application ID, Password, and URL. Once this is set and your client side code has correctly registered with RIM’s servers, you are now ready to push to the application. Collect the PIN from your device, and click  Push NotificationsTest Push Notifications, and then select the BlackBerry tab. Enter in the PIN, content-type (usually text/plain to start, but that depends on your client side application), and some body text. If all is configured correctly, you will have received your first push notification.

Server Side

You’re now ready to integrate the API with your server code. Urban Airship uses a simple RESTful web service to send notifications in whatever language or environment you use. You can even test it using curl, a common command-line web request program, like so:

curl -X POST -u <application key>:<master secret> -H “Content-type: application/json” –data ‘{“device_pins”: [“12345678”], “blackberry”: {“content-type”: “text/plain”, “body”: “hello”}}’ https://go.urbanairship.com/api/push/