Hybrid Web Container API Changes in Version 2.2

Changes in the Hybrid Web Container API include refactored JavaScript API names and new JavaScript APIs.

JavaScript APIs Available in Designer

JavaScript APIs are now available from the Hybrid App Designer. Hybrid App Designer now generates Hybrid Apps that use the new JavaScript APIs from Hybrid Web Container.
Note: This means version 2.1 ESD #3 APIs are deprecated; use version 2.2 JavaScript APIs.
You can access generated API documents from Developer Guide: Hybrid Apps, via a link in Hybrid Web Container and Hybrid App JavaScript API Reference.
  • Hybrid Web Container – the files where the Hybrid Web Container JavaScript APIs are defined are located in SUP_HOME\UnwiredPlatform\MobileSDK<version>\HybridApp\API\Container.
  • Hybrid App – the files where the Hybrid App JavaScript APIs are defined are located in SUP_HOME\UnwiredPlatform\MobileSDK<version>\HybridApp\API\AppFramework.

Hybrid Web Container JavaScript Name Changes

Some JavaScript API names have been refactored. The JavaScript APIs are now in the "hwc" namespace and the word "Workflow" has been replaced with "HybridApp". The updated API can be found in the installation directory: SUP_HOME\MobileSDK22\HybridApp\API.

Hybrid App Framework

This release provides an optional application framework that you can use on top of the core Hybrid Web Container APIs to manage data and user interface exchange. JavaScript APIs are now provided in the installation directory.

Refactored Hybrid App JavaScript Classes
Classes Description
API.js Functions that users typically call from within a function in Custom.js (or in a function contained in a different .js file called by a function in Custom.js). Roughly categorized into utility functions, message data functions, user interface functions, native functions, and validation functions.
Custom.js Entry point where user-supplied code is added. Typical examples of methods include customBeforeMenuItemClick, customAfterDataReceived, and customBeforeShowScreen.
Utils.js Functions included in the application framework that the Hybrid App invokes directly.
WorkflowMessage.js JavaScript objects and methods that provide an in-memory object hierarchy representation of messages being sent between the Hybrid App and the Unwired Server.
Resource.js Access localized string resources.
New JavaScript Methods
Methods Description
hwc.CustomIcon Indexes custom icons; defined in hwc-api.js.
  • doOnlineRequest
  • asynchronous
  • cachePolicy
Makes online request calls.

Documented in generated developer documentation, and available from Developer Guide: Hybrid Apps, Hybrid Web Container and Hybrid App JavaScript APIs.

Access OData Sources

JavaScript APIs that enable a Hybrid App to access OData enterprise information system (EIS) data sources.

New OData SDK Access
Classes Description
Data.js Open source API shipped with Unwired Platform
Documented in:
  • Developer Guide: Hybrid Apps, see Develop OData-based Hybrid Apps