Developing a Cordova WebView Application

A Cordova WebView application is an application that can take advantage of external web applications by loading them directly in its view.

If the external web application is a Unisys MVC Single Page Application (AJAX), the MVC application can use Unisys Hybrid Application Responsive Web Extensions to access native device capabilities, such as contact lists and the camera for barcode scanning.

If the external web application is not a Unisys MVC Single Page Application, you can still access it from your WebView application, but the web application cannot access native device capabilities. For example, you might have developed a mobile web application by using the Unisys Web Forms mobile controls.

To develop a WebView application that accesses a Unisys MVC Single Page Application, perform the following:

  1. Develop and test a Unisys MVC Single Page Application (AJAX).

    For more information, see the ClearPath ePortal Developer Help.

  2. Select build configuration as Debug and stage the Unisys MVC Single Page Application (AJAX).

    For more information, see the ClearPath ePortal Developer Help.

  3. Deploy the Unisys MVC Single Page Application (AJAX) using the ClearPath ePortal Manager.

  4. Ensure that you can access the deployed application by using a desktop browser and the HTTPS URL.

    Note: When you access the HTTPS URL, you should not see any certificate errors or warnings in the desktop browser. If you see any errors or warnings, then the Multi-Device application will fail to load properly. Do not use an IP address as part of your HTTPS URL. Instead, use the DNS name for the ePortal platform instead of the IP address.

  5. Create a new Multi-Device Hybrid App as described in Creating a New Cordova Project.

    Note: You can create a Multi-Device Hybrid App using the Cordova CLI with Visual Studio Code.

  6. Configure the Multi-Device Hybrid App.

  7. If required, install any plugins that the MVC app requires. For example, if you are using the barcode control, install the plugins cordova-plugin-camera and cordova-plugin-barcodescanner. If you are using any of the contact controls, install the plugin cordova-plugin-contacts.

  8. Test the Unisys Multi-device Hybrid app locally using Chrome browser simulation.

  9. Repeat steps 2 through 4, and select build configuration as Release.

  10. Build the Unisys Multi-Device Hybrid App and test it with different emulators and devices.