Skip to content

Defining Feature Restriction Policy

Feature restriction policies enable you to control feature access for the selected application. Set these policies in SAP mobile service cockpit. You can add, allow, restrict, edit, or delete features.

When you edit a native or hybrid app in, or an app developed with the Mobile Development Kit, in SAP mobile service cockpit, available feature plugins are listed on the Mobile Settings Exchange screen. Feature plugins are typically JavaScript APIs that provide access to the native APIs of the mobile device (for example, for Hybrid apps they are typically implemented as Apache Cordova plugins, such as Camera, Calendar, and Push). You can indicate features that should be restricted from the user.

When a plugin, for example, the bar code scanner plugin, is in a disabled state on the server, the application starts a settings exchange and does two things:

  • Invalidates the native side of the plugin.

  • Changes the namespace of the plugin to null.

You may later enable a plugin on the server side, and trigger a settings exchange. At that time, although the plugin is not present in the disabled list, the value of the cordova.plugins.barcodeScanner namespace remains null; this value is reset only if a page refresh occurs, and Cordova reloads the plugin namespaces.

The new feature restriction policy takes effect after you exit the application and restart it to allow Cordova to refresh all the namespaces.


It is a good idea to verify that a specific feature is enabled before calling the feature in the Web application (or underlying component that consumes the application).

  1. In SAP mobile service cockpit, select Mobile Applications > Native/Hybrid or SAP Mobile Cards.

  2. Select an application, then select Mobile Settings Exchange under Assigned Features (or add it first).

  3. Under Feature Flags, you see the current status of feature restriction policies.

    Column Description
    Plugin A list of feature plugins that are available with the application, such as Camera, Calendar, and Push.
    ID Unique identifier for the feature plugin.
    Active Indicates whether the feature is allowed or restricted.
    Select if the feature is allowed (Yes)
    Unselect if the feature is restricted (No).
    Actions The actions you can take, such as edit or delete.
  4. (Optional) Select create to add a feature restriction policy for the selected application, and then OK.

    Field Description
    Name A unique feature name.
    Plugin A feature plugin that is available with the application, such as Camera, Calendar, and Push.
    Plugin Name Plugin name.
    Description A feature plugin description, such as Cordova Camera Plugin, Cordova Contacts Plugin, and SAP Push Plugin.
    JavaScript Module A comma-separated list of all JavaScript modules that are used by this plugin. The JavaScript Module value is the JavaScript API that is used to invoke the plugin.
    ID Unique identifier for the plugin. The value comes from the cordova_plugins.js file, which appears in the project after you add a plugin ("pluginId").
    Active Toggle the feature On (allowed) or Off (restricted. By default, features are allowed.
  5. Select Save.

Last update: May 20, 2021