Setting up the sample application in the BlackBerry JDE
Install the sample application
- Visit http://www.blackberry.com/go/httppushsampleapp to download the sample application.
- Extract the httppushdemo.zip file.
- On the taskbar, click Start > Programs > Research In Motion > BlackBerry JDE 4.7.0 > JDE.
- Open the workspace that you want to add the sample application to.
- In the workspace tree, right-click the project that you want to add the sample application to.
- Click Add project to <workspace directory>.
- In the Add project to <workspace> dialog box, browse to the folder where you extracted the sample application.
- Double-click Device.
- Click the HTTPPushDemo.jdp file.
- 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.
- 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.
- 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.
- On the taskbar, click Start > Applications > Research in Motion > BlackBerry Email and MDS Services Simulators > MDS to start the BlackBerry® MDS Simulator.
- On the taskbar, click Start > Applications > Research In Motion > BlackBerry JDE 4.6.0 > JDE to open the BlackBerry® Java® Development Environment.
- Press F5 to build the open projects and start the BlackBerry® Smartphone Simulator.
- In the BlackBerry Smartphone Simulator, click the Browser icon.
- In the web address field, type a web address.
- Press the Enter key.
- Close the browser.
- On the Home screen of the BlackBerry Smartphone Simulator, click the Downloads folder.
- Click HTTP Push Demo.
- On your computer, browse to the folder where you extracted the sample application.
- In the server folder, double-click run.bat to open the server-side sample application.
- In the sample application, in the top field, type a message.
- To set the protocol that the application should use when it sends data, select the rim or pap option.
- Click Send.
- In the BlackBerry Smartphone Simulator, click OK.
Next topic: Install the sample application
Previous topic: Run the sample application