Blackberry - Push Notification Guide
By Technical Support
#27 To integrate BulkPush Push Notifications SDK into your BlackBerry application you need to do simple following steps:

1. Inherit your application from PushUIApplication.
Code: Select all<strong>
public class SampleUIApplication extends PushUIApplication
</strong>


2. Pass the following parameters to the superclass constructor:
Code: Select all<strong>
protected SampleUIApplication()
    {
        super(Keys.BLACKBERRY_PUSH_APPLICATION_ID, Keys.BLACKBERRY_PUSH_URL,
                Keys.BLACKBERRY_PUSH_PORT, Keys.BULK_PUSH_APPLICATION_ID,
                "widdle_icon.png", "uiicon.png", "uaiconAlert.png",
                "/cash.mp3");
    }
</strong>
Keys.BLACKBERRY_PUSH_APPLICATION_ID – BlackBerry Application ID
Keys.BLACKBERRY_PUSH_URL – Blackberry Push Notification URL you have received after registration
Keys.BLACKBERRY_PUSH_PORT – Blackberry Push Notification Port you have received after registration
Keys.BULK_PUSH_APPLICATION_ID – BulkPush Application ID
“widdle_icon.png” – Indicator image (24×24 px). Appears as the push indicator when the push notification have been received
“uaicon.png” – Normal application icon (displays when the push notification have been read (57×57 px)
“uaiconAlert.png” – Application icon to display when when the push notification have been received (57×57 px)
“/cash.mp3″ – sound to play when the push notification have been received.


3. Implement the following function:
Code: Select all<strong>
protected void handleNotification(final String notification)
    {
        Runnable r = new Runnable()
        {
            public void run()
            {
                BBPushDialog uad = new BBPushDialog(notification);
                try
                {
                    pushModalScreen(uad);
                } catch (IllegalStateException e)
                {
                    // pass through
                }
            }
        };
        invokeLater(r);
    }
</strong>


That’s it! Easy, isn’t it?
SDK comes with the full source and a Sample Blackberry push notifications app. See SDK for more details.
NOTE: Simulator (Ripple) is not able neither to subscribe nor receive Blackberry push notifications.