Setting up the sample application in the BlackBerry Java Plug-in for Eclipse
Install the sample application
- In Eclipse®, on the File menu, click Import.
- In the Import dialog box, expand the BlackBerry folder.
- Click Import BlackBerry Samples.
- Click Next.
- Perform one of the following actions:
- In the BlackBerry Projects section, click Deselect All.
- Select the check box beside the HTTPPushDemo project.
- Click Finish.
Run the sample application
To make sure that
the application delivers the push data to the correct application, you must
complete Step 5. 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.
Before you begin: To perform this task,
you must set
Eclipse® to
start the BlackBerry MDS
Connection Service when you start the BlackBerry Smartphone 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.
- In Eclipse®, in the Navigator pane, right-click the HTTPPushDemo folder.
- Click Run As > BlackBerry Simulator.
- If necessary, on the Home screen of the BlackBerry® Smartphone Simulator, click the Downloads folder.
- Click the HTTP Push Demo icon.
- In your Eclipse installation folder, navigate to the HTTP server folder. The default installation path is C:\Program Files\Eclipse\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.16\components\samples\com\rim\samples\server\httppushdemo.
- 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: System requirements