UserPolicy.create(TemplateDescriptor, ...) synchronous method

Synchronously creates a new UserPolicy object from a template descriptor.

Signature

public static UserPolicy create(
                                     TemplateDescriptor templateDescriptor,
                                     String userId,
                                     AuthenticationRequestCallback authenticationContext,
                                     int userPolicyCreationFlags,
                                     Map<String,String> signedAppData,
                                     LicenseMetadata licenseMetadata,
                                     final Context applicationContext) 
                              throws ProtectionException

Parameters

Name Datatype Notes
templateDescriptor
TemplateDescriptor
userId
String
A unique user identifier such as an email address.
This userId is used to discover the RMS service instance (either ADRMS server or Azure RMS) that the user's organization is using. userId is used for caching user policy as well for offline usage.
authenticationContext
AuthenticationRequestCallback
userPolicyCreationFlags
int
For more information, see UserPolicyCreationFlags)
signedAppData
Map<String,String>
licenseMetaData
LicenseMetadata
If you want to enable document tracking, it must be initialized before creating the UserPolicy with the TemplateDescriptor object.
For more information, see How to: Use document tracking.
applicationContext
Context

Throws

ProtectionException

Returns

UserPolicy

Defined in

UserPolicy.java

Supported Platforms

Minimum supported OS version
Android 4.0.3 (API level 15)