Search code examples
emailblackberryblackberry-simulator

Configure email address on BlackBerry simulator


I am testing a BlackBerry app on the BB Simulator with MDS simulator. The app uses this line of code to get the BB email address and then use it as a parameter to call a webservice.

String emailAddress = Session.getDefaultInstance().getServiceConfiguration().getEmailAddress();

Then problem is that getEmailAddress method always returns: '[email protected]', and the webservice not works with that address. I havent control over bb app source code or webservice source code, so I want to configure the BB simulator or MDS simulator to return a different email address when I call: getEmailAddress.

Is that posible?


Solution

  • The email address of the BlackBerry Smartphone Simulator is not configurable within the simulator itself.

    However, if you connect the BlackBerry Smartphone Simulator to a BlackBerry Enterprise Server it email address will change to the one specified in the BES account.

    You can follow the steps here:

    Connect the BlackBerry Device Simulator to a BlackBerry Enterprise Server

    Apply:

    BlackBerry® Enterprise Server software version 4.0 and later BlackBerry Device Simulator 4.0 and later

    Procedure:

    Using the BlackBerry JDE 4.0 (or BlackBerry Device Simulator 4.0), the BlackBerry Device Simulator can be connected to an account on the BlackBerry Enterprise Server.

    1)Run the BlackBerry Device Simulator from the BlackBerry JDE or from the Start menu.

    2)In the BlackBerry Device Simulator, click Turn Wireless Off.

    3)Open BlackBerry® Desktop Manager 4.0 or later.

    4)Open BlackBerry® Device Manager 4.0 or later.

    5)From the BlackBerry Device Simulator, click Simulate and select USB Connected or Serial Connected.

    6)Select YES to switch to the new BlackBerry device.

    7)Follow the instructions to generate a new encryption key.

    8)On the Initial Plug-in: Verifying Applications dialog box, click Cancel.

    9)Once the initial synchronization is complete, the enterprise activation process begins.

    After the enterprise activation process is complete, you will be able to use the BlackBerry Device Simulator like a regular BlackBerry device.

    Note: Additionally, you may need to remove the net_rim_sdk_simulationSB.cod file from the BlackBerry Device Simulator directory. However, do not delete this COD file because you will need to restore it if you use the BlackBerry Device Simulator with the Email Server Simulator (ESS). After doing so, delete the DMP files from the BlackBerry Device Simulator directory, start the BlackBerry Device Simulator, and repeat the steps above.

    To verify that the BlackBerry Device Simulator has connected to the BlackBerry Enterprise Server using serial bypass, click the Statistics tab in BlackBerry Device Manager.

    If the BlackBerry Device Simulator is connected, you should see Bypass. Expand this menu to view statistics (for example, packets sent/received).

    Or

    If only the Time Connected statistic appears, without the Bypass statistics, the BlackBerry Device Simulator is not connected to the BlackBerry Enterprise Server over serial bypass and the enterprise activation process cannot occur. Delete the DMP files from the BlackBerry Device Simulator directory and complete the above steps in order to remove the net_rim_sdk_simulationSB.cod file from the BlackBerry Simulator directory. Alternatively, you can attempt this procedure with a BlackBerry device to verify that your BlackBerry Enterprise Server configuration supports serial bypass.

    all the best