Generating Code For a BlackBerry Device Application

Use the Generate Device Application wizard to generate the device application code.

Prerequisites

Verify the device application and fix any errors that are found. Device applications with errors cannot be generated.

Task
  1. Click the Verify icon check_16 on the toolbar to verify the device application has no errors.
  2. Click the code generation icon generate_deviceclient_16 on the toolbar.
  3. In the Generate Device Application wizard, in Device Platform, select BlackBerry, and, optionally, select:
    Option Description
    Server domain Select the domain to use for the connection profile. The profiles used in the design appear in the Profile column. The initial value of "default" appears under the domain. Select the Domain column to choose a different domain.

    You can enter any value you want or select one that is available. The list of available domains are returned from the profile. If you have previously connected, it caches the list of last known domains. If you have never connected, “default” is returned.

    Locale Expand this section to see a list of available locales from which you can select.
    Advanced Expand this section for advanced options:
    • Check mobile business object on Sybase Unwired Platform Server – select to verify that the mobile business objects that are used in the device application exist on the corresponding Unwired Server.
    • Mobile Business Object Group – the mobile business object group that contains the mobile business objects you want to verify. Click Generate Code to launch the Generate Code wizard.
  4. Click Next.
  5. In the Generate Device Application wizard, enter the information, then click Finish:
    Option Description
    Favorite Configurations (Optional) Select a saved configuration from the drop-down list.
    Note: The Remove the custom folder option state is not saved in a favorite configuration. You must explicitly choose that option when you want to remove the custom folder that contains any custom coding you have added.
    Locations
    • Generate code only – if this option is selected, the code is not compiled.
    • Deploy the BlackBerry application – select to deploy the BlackBerry application to the specified location. Selecting this option activates the Deploy Configurations section, where you can set the locations for the BlackBerry rapc compiler, simulator location, and so on.
    Deploy Configurations
    • BlackBerry rapc compiler – the BlackBerry JDE rapc compiler location. This determines the operating system version of the generated BlackBerry application.
    • Copy to Simulator location – the filepath to the location of the compatible simulator you want to use for development and testing.
      • Start the BlackBerry Simulator after copying – select to start the simulator after you generate the device client application.
      • Start MDS automatically – select if a connection to the mobile business object is required. This is a one-time action. A check is performed to see whether the MDS is started. If it is, it will not be started twice. Once the MDS is running, it does not have to be restarted.
      • Disable signing – disables the signing process for testing only. This option is available only when you are copying the generated COD files to a simulator location for testing.
    • Copy to desktop location – the location where you want to copy the generated .cod files.
    • Copy to Workspace location – the location for the workspace to which you want to copy the device client application.
    Debug the BlackBerry application Debug configurations:
    • Client project
    • Options project
    • Launch the BlackBerry project
      • Launch configuration
    Note: This option is enabled only if you have installed the BlackBerry Java Plug-in for Eclipse.
    Advanced
    • Open the generated folder under Windows Explorer – select this option to open the generated folder under Windows Explorer when code generation is complete. This is useful to locate the generated source so you can move it to a JDE project or for custom coding.
    • Generated artifacts location – this option indicates the location of the folder where all the code is generated. The default is <workspace>\<dad_project_name>\DAD Generated Code\<dag_file_name>\Blackberry. Click Browse to change the location.

      Click Restore to restore to the default location.

    • Remove the Custom folder – select this option to remove any previously generated custom code placed in the Custom folder.
    • Use JDK path – use this JDK path for the rapc.exe compiler from RIM. This must be in the following format: c:\program files\java\jdk1.6.0_16\bin.
    • Configure package for generated code – select this option to specify one or more of the following package names.
      • Package for the client code - The package for the code in XX.cod.
      • Package for the option code - The package for the UI code in XXOptions.cod.
      • Package for the object API code - The package for the object API.