Using the sample server-side push initiator

You can run the sample server-side push initiators to understand how the Push Service SDK works by sending push messages to push-enabled apps on BlackBerry devices. Using the web interface for either the high-level or low-level sample server-side push initiator, you can type a text message or attach a .txt, .gif, .jpg, .png, .xml, or .html file, and send it to a push-enabled app. The text message or file can't be more than 8 KB.

The sample server-side push initiators are installed if, in the setup application for the Push Service SDK, you select the high-level and low-level API distributions along with an Apache Tomcat server with the sample server-side push initiators deployed on the server. For more information about the setup application, see Installing the SDK.

Before you run the sample server-side push initiators, download and install a push-enabled app on a device. You can install your own push-enabled app, or you can install one of our sample push-enabled apps. We include sample push-enabled apps in the following SDKs as separate downloads, along with documentation that explains how to configure and register the apps.

You can also use the BlackBerry WebWorks SDK to develop a push-enabled app for BlackBerry 7 and earlier. For more information, see the API Reference.

If you're using a push-enabled app with the low-level sample server-side push initiator, configure and register the push-enabled app after you download and install it on a device.

If you're using a push-enabled app with the high-level sample server-side push initiator, don't configure and register the push-enabled app after you download and install it on a device. You configure and register the app when you use the high-level sample server-side push initiator to send a push message to the app.

Use the high-level sample server-side push initiator

Before you begin, obtain the application ID and password from the confirmation email that you received when you registered with BlackBerry. If you're using the BlackBerry Enterprise Server or the BlackBerry Device Service, check with your administrator to see if you need a username or password to send push messages.

  1. Start the Apache Tomcat server.
  2. Browse to https://localhost:8443/high-level-sample to open the sample server-side push initiator.
  3. If you're using the sample server-side push initiator for the first time, the Application Management screen appears. Perform the following actions:
    1. Choose the type of PPG that you're using, and click Submit.
    2. Fill in the fields in the Add push application form.

      You can specify details about the push-enabled app (for example, the app name, ID, and version number) and details about the PPG (for example, the level of service). You can also indicate that you want the server-side push initiator to reconcile push messages, and you can specify the relevant details (for example, the URL that the PPG uses to send result-notification request messages).

    3. Click Add application to add a record for the app with the SDK.
  4. Go to the push-enabled app that you downloaded and installed on the device, and configure and register the app. Be sure to specify the URL for the server-side push initiator when you configure the app. Also, make note of the username that you use when you register the app because you need it in step 7.
  5. In the sample server-side push initiator, in the Push Management drop-down list, click Push.
  6. In the Push Application drop-down list, click the push-enabled app that you want to deliver the push message to.
  7. In the Subscribers field, type the username that you used to register the push-enabled app in step 4. The sample server-side push initiator translates the username into a subscriber ID.
  8. Specify a file or type the text that you want to send to the push-enabled app.
  9. Click Send Push.

Use the low-level sample server-side push initiator

Before you begin, perform the following actions:

  • If you're using the BlackBerry Internet Service as the PPG, obtain the application ID and password from the confirmation email that you received when you registered with BlackBerry. If you're using the BlackBerry Enterprise Server or the BlackBerry Device Service, check with your administrator to see if you need a username or password to send push messages.
  • Obtain the PIN of the device where the push-enabled app is installed.
  • If you're using one of our push-enabled apps, configure and register the push-enabled app after you download and install it on a device.
  1. Start the Apache Tomcat server.
  2. Browse to https://localhost:8443/low-level-sample to open the main page of the sample server-side push initiator.
  3. In the Push Management drop-down list, click Push.
  4. In the Application Id and Password fields, type the application ID or username and password.
  5. Specify a file or type the text that you want to send to the push-enabled app.
  6. In the Addresses field, type the PIN of the device where the push-enabled app is installed.
  7. Click Send Push Request.

Last modified: 2015-07-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus