UsercentricsUI API¶
UsercentricsUI¶
getPredefinedUI¶
UsercentricsUserInterface.getPredefinedUI(settings: <UsercentricsUISettings>) { <UsercentricsConsentUserResponse> in
// Handle consent response
// Dismiss PredefinedUI
}
val usercentricsView = UsercentricsPredefinedUI(context, <UsercentricsUISettings>)
usercentricsView.load { userResponse ->
// Handle consent response
// Dismiss PredefinedUI
}
Inputs | Type | Notes |
---|---|---|
settings* | UsercentricsUISettings | Configuration options for Predefined UI |
Objects¶
UsercentricsUISettings¶
Properties | Type | Notes |
---|---|---|
customLogo | UIImage/UsercentricsImage | Overwrites the logo loaded via URL defined in our Admin Interface. We recommend to pass your logo locally to improve performance and image quality. |
customFont | UIFont/UsercentricsFont | Overwrites the font and text sizes defined in our Admin Interface. |
showCloseButton | Bool | Shows a "X" button on the top right, which will close the CMP when pressed. Use this only when users have already given consent once. Default is false. |
UsercentricsConsentUserResponse¶
Properties | Type | Notes |
---|---|---|
userInteraction | Enum | Response given by user: AcceptAll: User accepted all services, DenyAll: User denied all service. Granular: User gave a granular choice, No Interaction: User dismissed the Banner with no response. |
consents | [UsercentricsServiceConsent] | List of Services with consent choices. |
controllerId | String |