Setting up the sample application in the BlackBerry JDE

Install the sample application

  1. Visit http://www.blackberry.com/go/httppushsampleapp to download the sample application.
  2. Extract the httppushdemo.zip file.
  3. On the taskbar, click Start > Programs > Research In Motion > BlackBerry JDE 4.7.0 > JDE.
  4. Open the workspace that you want to add the sample application to.
  5. In the workspace tree, right-click the project that you want to add the sample application to.
  6. Click Add project to <workspace directory>.
  7. In the Add project to <workspace> dialog box, browse to the folder where you extracted the sample application.
  8. Double-click Device.
  9. Click the HTTPPushDemo.jdp file.
  10. Click Open.

Run the sample application

To make sure that the application delivers the push data to the correct application, you must complete Steps 6 to 9. Before the BlackBerry MDS Simulator can successfully deliver push data with application acknowledgement, it must determine whether the BlackBerry Smartphone Simulator supports application-level reliability. This support is determined by using the BlackBerry Smartphone Simulator to retrieve a web page through the BlackBerry MDS Simulator.
  1. In C:\Program Files\Research In Motion\BlackBerry Email and MDS Services Simulators 4.1.5\MDS\config, open the rimpublic.property file in a text editor.
  2. In the rimpublic.property file, verify that the line push.application.reliable.ports=100 is not commented out. If it is commented out, remove the comments.
  3. On the taskbar, click Start > Applications > Research in Motion > BlackBerry Email and MDS Services Simulators > MDS to start the BlackBerry® MDS Simulator.
  4. On the taskbar, click Start > Applications > Research In Motion > BlackBerry JDE 4.6.0 > JDE to open the BlackBerry® Java® Development Environment.
  5. Press F5 to build the open projects and start the BlackBerry® Smartphone Simulator.
  6. In the BlackBerry Smartphone Simulator, click the Browser icon.
  7. In the web address field, type a web address.
  8. Press the Enter key.
  9. Close the browser.
  10. On the Home screen of the BlackBerry Smartphone Simulator, click the Downloads folder.
  11. Click HTTP Push Demo.
  12. On your computer, browse to the folder where you extracted the sample application.
  13. In the server folder, double-click run.bat to open the server-side sample application.
  14. In the sample application, in the top field, type a message.
  15. To set the protocol that the application should use when it sends data, select the rim or pap option.
  16. Click Send.
  17. In the BlackBerry Smartphone Simulator, click OK.
The message that the server-side application sends is rendered on the client-side application in the BlackBerry Smartphone Simulator.

Was this information helpful? Send us your comments.