SAP Fiori Client Guide

Adding the Application Preferences Plugin

To install the Application Preferences plugin, use the Cordova command line interface.

Prerequisites

  • Set up the development environment.
  • Create your Cordova project.
  • Add your OS platforms.

Procedure

  1. Add the Application Preferences plugin by entering the following at the command prompt, or terminal:

    cordova plugin add kapsel-plugin-apppreferences --searchpath KAPSEL_HOME/plugins

  2. (Optional) To see a list of installed plugins in your Cordova project, open a command prompt or terminal window, navigate to your Cordova project folder, and enter:
    cordova plugins
    The Cordova command line interface returns a JSON array showing installed plugins, for example:
    [ 'cordova-plugin-camera',     
    'cordova-plugin-device-motion',     
    'cordova-plugin-file' ] 

    This example shows that the Cordova project has the Cordova core Camera, Accelerator (device-motion), and File plugins installed.

  3. Optionally, specify preferences on Android or iOS.
    • On Android, optionally choose a different theme for the settings dialog by modifying AndroidManifest.xml
    • On iOS, the preferences are specified by values in a plist file. There is a sample file available at <SDK_HOME>\MobileSDK3\KapselSDK\apps\fiori_client\assets\Root.plist.
  4. Modify the files in the Cordova project's www folder as appropriate for your project.
  5. Execute the following command to copy the files in the Cordova project's www folder to the platform directories:
    cordova prepare android
    cordova prepare ios 
    cordova prepare windows
  6. Use an integrated development environment to deploy and run the project.