public class ManagedConsent extends ConsentImplementation
| Modifier and Type | Class and Description |
|---|---|
static interface |
ManagedConsent.ManagedConsentDelegate
Notifies about the need to show the consent dialog.
|
static class |
ManagedConsent.ManagedConsentState
Possible states of consent given by the user.
|
| Constructor and Description |
|---|
ManagedConsent(CMP cmp,
Context context,
ManagedConsent.ManagedConsentDelegate delegate)
Creates the
ManagedConsent instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
CMPNeedsUI() |
void |
editConsent(Activity activity)
Presents the consent screen, allowing the user to change consent settings.
|
void |
onCMPFailedToLoad(String error) |
void |
onCMPFailedToShow(String error) |
void |
onConsentUpdated(ManagedConsent.ManagedConsentState state) |
void |
reload(Activity activity)
Tells the CMP to reload.
|
void |
showIfNeeded(Activity activity)
Presents the consent screen ONLY if it is required by the used CMP (i.e. no user consent has been set yet).
|
String |
toString() |
public ManagedConsent(CMP cmp, Context context, ManagedConsent.ManagedConsentDelegate delegate)
ManagedConsent instance.cmp - Instance of CMP to be used.context - The Context of your application.delegate - The ManagedConsent.ManagedConsentDelegate instance. Must not be null.public void showIfNeeded(Activity activity)
activity - The Activity from which the consent screen will be shown.public void editConsent(Activity activity)
activity - The Activity from which the consent screen will be shown.public void reload(Activity activity)
ManagedConsent.ManagedConsentDelegate.managedConsentCMPFailedToLoad(ManagedConsent, String) callback.activity - The Activity instance.public void onConsentUpdated(ManagedConsent.ManagedConsentState state)
public void onCMPFailedToShow(String error)
public void onCMPFailedToLoad(String error)
public void CMPNeedsUI()