API reference
API reference
Select your platform
No SDKs available
No versions available

Consent Class

Modifiers: final
Consent APIs provide platform methods to check status of different consent types. And also provides way to launch a consent flow if required.

Signature

class Consent

Constructors

Consent ()
Signature
constructor()
Returns
Consent

Functions

getConsentStatus ( consentFlowName , version , extraParams )
Returns the current status of a consent.
Signature
suspend fun getConsentStatus(consentFlowName: String, version: String? = null, extraParams: Map<String, String>? = null): List<ConsentStatusResult>
Parameters
consentFlowName: String
Name of the consent. Check the list of allowed consent names here (TODO: Add list of consent links).
version: String?
Optional Param: version of the consent. Some consent supports consenting to different versions. This shouldn't be necessary for most cases.
extraParams: Map?
Optional Param: some consents require some extra data e.g. target app. Use this to pass extra info. (TODO: Add list of extra params for each consents)
Returns
List
A list of result of the consent status check.
launchConsentIfRequired ( consentFlowName , version , extraParams )
Returns the current status of a consent.
Signature
suspend fun launchConsentIfRequired(consentFlowName: String, version: String? = null, extraParams: Map<String, String>? = null): ConsentLaunchResult
Parameters
consentFlowName: String
name of the consent to launch. Check the list of allowed consent names here (TODO: Add list of consent links)
version: String?
Optional Param: version of the consent. Some consent supports consenting to different versions. This shouldn't be necessary for most cases.
extraParams: Map?
Optional Param: some consents require some extra data e.g. target app. Use this to pass extra info. (TODO: Add list of extra params for each consents)
Returns
ConsentLaunchResult
The requests result.
Did you find this page helpful?