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 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
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).
In SAP mobile service cockpit, select Mobile Applications > Native/Hybrid or SAP Mobile Cards.
Select an application, then select Mobile Settings Exchange under Assigned Features (or add it first).
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.
(Optional) Select to add a feature restriction policy for the selected application, and then OK.
cordova_plugins.jsfile, 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.