For all you hard-working developers out there, the BlackBerry® Smartphone Simulator is an essential tool: it enables you to run BlackBerry® smartphone applications on your computer. The BlackBerry Smartphone Simulator includes the BlackBerry native applications that are typically available on BlackBerry smartphones, and enables you to load and test your own applications. You can even simulate and test various connectivity and state changes – definitely useful when you’re trying out a new app! When you use the BlackBerry Smartphone Simulator to perform testing, you might need to simulate additional BlackBerry services; the BlackBerry® Email and MDS Services Simulator Package are available for this purpose.
In short, the BlackBerry Smartphone Simulator allows you simulate all the aspects of the BlackBerry smartphone including battery conditions, network conditions, SD Card, GPS capabilities and more. In this post, I will briefly describe how to simulate some of the functionalities of the BlackBerry smartphone. Before we go further, let’s quickly recap where you can find the latest BlackBerry Smartphone Simulators. All the most up-to-date BlackBerry simulators can be found at the BlackBerry Smartphone Simulators page under the Developer Resources section of the website. You can also head here for the complete instructions on installation details, and you can find more detailed information on the BlackBerry Smartphone Simulators at the BlackBerry Documentation site.
How to Simulate Battery Conditions
- On the Simulate menu, click Battery Properties.
- Set one of the following options:
|Full||The battery level is sufficient for BlackBerry smartphone and network use.|
|Low||The BlackBerry smartphone alerts the user, but remains turned on and can still use the network.|
|Very Low||The BlackBerry smartphone cannot access the network, but the device remains turned on. Camera flash is disabled.|
|Dead||The BlackBerry device turns off immediately. If you select this option, the BlackBerry Smartphone Simulator shuts down.|
|Other||This option enables you to specify the battery level as a percentage.|
How to Simulate Network Coverage
The BlackBerry Smartphone Simulator can simulate various states of network coverage, from a strong signal to a very weak signal. The BlackBerry Smartphone Simulator can also simulate a loss of network coverage.
Add a network
- On the Simulate menu, click Network Properties.
- Click Add.
- Type the network properties in the dialog.
- Click OK.
Set the network signal strength
- On the Simulate menu, click Network Properties.
- Select the network you want to simulate from the Networks list.
- If you want to edit the network properties, click Edit and type new values. Click OK.
- Select or clear the In coverage check box.
- Move the Signal strength (RSSI) slide bar to set a value. The signal strength can be between -120 dBm and -40dBm.
How to Simulate a Media Card
The BlackBerry Smartphone Simulator loads and saves the media card image to < session_name >*.sdcard in the working directory, unless you have set the /sdcard=< path > option. When the simulator starts, it loads the media card image for the BlackBerry smartphone profile. If no image exists or you have specified /clear-sdcard, the BlackBerry Smartphone Simulator will create a new media card image when the simulator starts. The size of the media card image is 32MB, unless you specify otherwise using /sdcardsize=< size >. In this case, you must clear the existing card image using /clear-sdcard to create a new card with the specified size. If a media card image exists, its size will be retained even if you specify a different size using the /sdcard-size command.
The BlackBerry Smartphone Simulator inserts the media card within the BlackBerry Smartphone Simulator unless you specify /no-sdcard-inserted.
Change the media card
- On the Simulate menu, click Change SD Card.
- Complete one of the following tasks:
|Specify a new media card||In the Current SD Card list, click a media card. To specify no card, click None.|
|Add a media card to the Current SD Card list from a file||a. In the SD Card dialog box, click Add SD Image.
b. Navigate to the location of the media card image file.
c. Click the media card image file.
d. Click Open.
|Create a new media card||a. In the SD Card dialog box, click Mount Directory.
b. Navigate to the location where you want to save the media card image.
c. Click OK
|Delete a media card||a. In the Current SD Card list, click the media card.
b. Click Yes.
c. Click Close.
How to Use Hotswap with the BlackBerry Simulator
Hotswap, the ability to reload an application on to a running simulator without having to stop and start the simulator, is now part of the 5.0 BlackBerry Simulator.
BlackBerry Smartphone JDE 5.0
In JDE 5.0, you need to change your Simulator preferences. Toggle the “Reuse Simulator” checkbox to on. (If the Reuse Simulator checkbox is grayed out, that simulator is not compatible with Hotswap.) Then, when debugging your application, you can change the code at any time and redeploy it without restarting the simulator by going to Debug > Restart or pressing Shift-F9.
BlackBerry® Java® Plug-in or BlackBerry® Web Plug-in
No changes are needed – you no longer need to close your simulator. While the simulator is open, simply make changes to your code and press debug – it will automatically redeploy the change to the running simulator.
Do you have any questions or comments about using the BlackBerry Smartphone Simulators? Please leave a comment and let us know!