Packaging Hybrid Apps Using the Packaging Tool

Use the packaging tool to package existing files into a Hybrid App package.

  1. Navigate to <SMP_HOME>\MobileSDK22\HybridApp\PackagingTool and double-click the packagingtool.bat file if you are using a 32-bit JDK, or packagingtool64.bat if you are using a 64-bit JDK.
  2. Click Browse to enter the filepath for the output directory where your projects are located, and click OK.
    All of the projects stored in the output directory you set appear in the Project Explorer list box.
  3. (Optional) Select a project to see the details of the project in the right pane. You can make changes to any of the General Information properties and click Save.
  4. (Optional) To create a new project:
    1. Click New at the bottom of the Project Explorer list box.
    2. Enter a project name.
    3. Click Browse to select a folder for the Web application folder from the local hard disk.
      The Web root folder is the location of your HTML files, typically, with any dependent HTML, JavaScript, CSS, images, and so on, files being in the same folder or subfolders. The WorkflowClient.xml file should also be in the Web application folder.
      Note: The Web application folder cannot be a subfolder of the workspace, and the workspace folder cannot be a subfolder of the Web application folder.
    4. Click OK.
      The new project name is added to the Project Explorer, and a project file is created in the workspace folder with the .pkgproj extension. The project will have a separate folder under the workspace to store all temporary files for deployment.
  5. (Optional) To remove a project from Project Explorer, select the project to remove and click Delete at the bottom of the Project Explorer list box.
  6. Set the configuration information for the project in the General Information tab.
    • Module name – the name of the Hybrid App on the server. The default value is the project name. This is required.
    • Module version – this can be any number. The default value is 1. It is required.
    • Module description – (optional) enter description text.
    • Display name – (optional) the display name.
    • Client icon – the default value is 48. It is required.
    • MBO package name – if the Hybrid App uses MBOs, input the MBO package name.
    • MBO package version – enter the version for the MBO package.
    • Invokable on client – a boolean value to determine whether the Hybrid App can be invoked from the client. The default value is true.
    • Processed Messages
      • Mark as read – the default value is false.
      • Delete – the default value is true.
    • Cache key – (optional) the key to represent the cache.
    • Activation key – (optional) define the key to use.
    • Shared storage key – (optional) enter the shared storage key.
    • SAP Mobile Platform server information – the manifest.xml file may require hard-coded credentials for logging in to SAP Mobile Server.
      • User name – enter the user name for logging into SAP Mobile Server.
      • Simple password – enter the password for logging into SAP Mobile Server.
      • Certificate – enter the certificate information for logging into SAP Mobile Server.
  7. Click the applicable platform tab to choose files for packaging.
    Five platforms are available: Android, BlackBerry 5, BlackBerry 6, iOS, and Windows Mobile 6. For each platform, you can choose whether to include the specific platform in the package, the files needed for the platform, the HTML files for the the platform, and the start screen to show for ths platform.

    The start screen is the screen to show by default for the selected platform. The html (or htm) file in the HTML File for the Start Page textbox is parsed and all screens are then listed. If the file is not an html file or there is no screen defined in the file, the start screen textbox is empty.

  8. (Optional) Click the Matching Rules tab to add matching rules.

    Matching rules describe the collection of rules that are used to determine if a given server notification will be sent to the application for processing. Each matching rule describes the field to test (for example, Subject), and the regular expression to test against for matches.

  9. (Optional) Click Custom Icon to add a custom icon for the Hybrid App package.
    When you add a custom icon, the manifest.xml file is updated when you generate the package.
  10. (Optional) Click Client Variables to add client variables for data that is associated with a particular client and application and that must be saved between user sessions.
  11. Click Generate.
    Configuration files are created and packaged in a ZIP file and placed in the output directory you specified.