Kony Management API Guide: App Management EMM JS APIs > Sharing Policy API

Sharing Policy API

The 'Sharing Policy API ' helps a developer to enable or disable data sharing from within an app.

com.kony.iemm.app.setSharingPolicy

This method sets Sharing policy defined by a developer to an app. This will overwrite Sharing policy if that is already set from the server.

Signature

JavaScript:com.kony.iemm.app.setSharingPolicy(allow);

Input Parameters

Variable Name allow
Presence Mandatory
Type Boolean
Values True - app is allowed to share documents
False - app is not allowed to share documents

Result Values

Int

Result Codes

Code Description
200 SUCCESS
400 FEATURE_NOT_SUPPORTED
500 FAILURE
600

APP_CONTEXT_NULL_ERRORCODE (android)

700 PACKAGE_NULL_ERRORCODE(android)

com.kony.iemm.app.clearSharingPolicy

This method clears Sharing policy set by a developer. Once the policy defined, the server defined Sharing policy will be applied to an app if any.

Signature

JavaScript:com.kony.iemm.app.clearSharingPolicy();

Input Parameters

Result Values

Int

Result Codes

Code Description
200 SUCCESS
500 FAILURE
400 FEATURE_NOT_SUPPORTED
600

APP_CONTEXT_NULL_ERRORCODE (android)

700 PACKAGE_NULL_ERRORCODE(android)
Copyright © 2017 Kony, Inc. All rights reserved.