AppConsent

public interface AppConsent

The interface contract that allows you to interact with CMP

Functions

Link copied to clipboard
@Deprecated(message = "The name of this method is not entirely clear on its execution.To avoid a breaking change, this one has been deprecated and another one has been implemented that executes the same functionality.This method will be removed in future releases", replaceWith = @ReplaceWith(imports = {}, expression = "this.isAllConsentablesAllowed"), level = DeprecationLevel.WARNING)
public abstract Boolean allConsentablesAllowed()

Finds out whether all consent items have been accepted by the user

Link copied to clipboard
@Deprecated(message = "The name of this method is not entirely clear on its execution.To avoid a breaking change, this one has been deprecated and another one has been implemented that executes the same functionality.This method will be removed in future releases", replaceWith = @ReplaceWith(imports = {}, expression = "this.isAllStacksAllowed"), level = DeprecationLevel.WARNING)
public abstract Boolean allStacksAllowed()

Finds out whether all stack items have been accepted by the user

Link copied to clipboard
@Deprecated(message = "The name of this method is not entirely clear on its execution.To avoid a breaking change, this one has been deprecated and another one has been implemented that executes the same functionality.This method will be removed in future releases", replaceWith = @ReplaceWith(imports = {}, expression = "this.isAllVendorsAllowed"), level = DeprecationLevel.WARNING)
public abstract Boolean allVendorsAllowed()

Finds out whether all vendor items have been accepted by the user

Link copied to clipboard
public abstract Unit checkForUpdate(Function1<Boolean, Unit> onResult, Function1<Throwable, Unit> error)

Check if update is needed. For example, if your Notice has been updated If called prior to user giving a consent returns false

Link copied to clipboard
public abstract Unit clearCache()

Clear all applications SharedPreferences

Link copied to clipboard
public abstract Unit clearConsent()

Clear user consent stored locally in applications SharedPreferences

Link copied to clipboard
public abstract Boolean consentableAllowed(Integer iabId, ACConsentableType consentableType)

Checks whether a consent has been authorized

Link copied to clipboard
public abstract Boolean consentGiven()

Check if user gave consent

Link copied to clipboard
public abstract Boolean extraConsentableAllowed(String extraId)

Checks whether an extra consent has been authorized

Link copied to clipboard
public abstract Boolean extraFloatingAllowed(String extraId)

Shows whether or not floating purpose has been authorized for a given extraId.

Link copied to clipboard
public abstract Boolean extraVendorAllowed(String extraId)

Checks whether a Extra Vendor has been authorized

Link copied to clipboard
public abstract Boolean geolocationConsentGiven()

Check if user gave consent for Geolocation purpose

Link copied to clipboard

Returns a list of consentables

Link copied to clipboard
public abstract Map<String, Boolean> getAllExtraVendors(ACConsentStatus consentStatus)

Return a list of all Extra Vendors

Link copied to clipboard
public abstract Map<String, String> getExternalIds()

Retrieves the list of your external id's, previously stored

Link copied to clipboard
public abstract GCMStatus getGCMConsentStatus()

This method shows the current status of GCMv2 (Google Consent Mode V2).

Link copied to clipboard
public abstract String getUserId()

Get the advertising id used by Appconsent. if isLimitedTrackingEnabled() == false, it will be Provider (Google, Amazon, etc.) ADID otherwise a random UUID

Link copied to clipboard

Finds out whether all consent items have been allowed by the user. If, on the other hand, consent items are present, then processing will be carried out and false will be returned if at least one of them is not allowed.

Link copied to clipboard

Finds out whether all consent items have been disallowed by the user. If, on the other hand, consent items are present, then processing will be carried out and false will be returned if at least one of them is not disallowed.

Link copied to clipboard
public abstract Boolean isAllStacksAllowed()

Finds out whether all stacks have been allowed by the user. If, on the other hand, stacks are present, then processing will be carried out and false will be returned if at least one of them is not allowed.

Link copied to clipboard
public abstract Boolean isAllStacksDisallowed()

Finds out whether all stacks have been disallowed by the user. If, on the other hand, stacks are present, then processing will be carried out and false will be returned if at least one of them is not disallowed.

Link copied to clipboard
public abstract Boolean isAllVendorsAllowed()

Finds out whether all vendors have been allowed by the user. If, on the other hand, vendors are present, then processing will be carried out and false will be returned if at least one of them is not allowed.

Link copied to clipboard
public abstract Boolean isAllVendorsDisallowed()

Finds out whether all vendors have been disallowed by the user. If, on the other hand, vendors are present, then processing will be carried out and false will be returned if at least one of them is not disallowed.

Link copied to clipboard
public abstract Boolean isFloatingNeedUpdate()

Find out if your Floating Purpose needs updating or not

Link copied to clipboard

Finds out whether or not the user has explicitly limited his or her advertising tracking

Link copied to clipboard
public abstract Boolean isSubjectToGDPR()

Return true if user is subject to GDPR. It depends on forceApplyGDPR into com.sfbx.appconsentv3.ui.model.ACConfiguration and phone's locale.

Link copied to clipboard
public abstract Boolean isUserAcceptAll()

This method lets you know the status of your users' consent.

Link copied to clipboard
public abstract Boolean isUserDenyAll()

This method lets you know the status of your users' consent.

Link copied to clipboard
public abstract Unit save(Function1<Boolean, Unit> onResult, Function1<Throwable, Unit> onError)

Saves the current state of user selections made on the CMP to the server

Link copied to clipboard
public abstract Unit saveExternalIds(Function0<Unit> success, Function1<Throwable, Unit> failed)

Send the external ids you have stored to the server. setExternalIds

Link copied to clipboard
public abstract Unit saveFloatingPurposes(Map<String, Boolean> floatingPurposes, Function0<Unit> success, Function1<Throwable, Unit> failed)

Send and save your floatingpurposes on the server.

Link copied to clipboard
public abstract Unit setConsentableConsents(Map<Integer, ACConsentStatus> consents, Function0<Unit> success, Function1<Throwable, Unit> error)

Defines the new status of consentables passed in parameter.

Link copied to clipboard
public abstract Unit setExternalIds(Map<String, String> externalIds)

Store a set of external id's to allow you to send them to the server later with the saveExternalIds method.

Link copied to clipboard
public abstract Unit setExtraConsentableConsents(Map<String, ACConsentStatus> consents, Function0<Unit> success, Function1<Throwable, Unit> error)

Defines the new status of extra consentables passed in parameter.

Link copied to clipboard
public abstract Unit setOnPresentGeolocationNoticeListener(OnPresentGeolocationNoticeListener onPresentGeolocationNoticeListener)

Set a listener to be notified when user has given his geolocation consent

Link copied to clipboard
public abstract Unit setOnPresentNoticeListener(OnPresentNoticeListener onPresentNoticeListener)

Set a listener to be notified when user has given his consent

Link copied to clipboard
public abstract Boolean stackAllowed(Integer stackId)

Checks whether a stack has been authorized

Link copied to clipboard

Try to display the Geolocation CMP; display is controlled by functional rules

Link copied to clipboard
public abstract Boolean tryToDisplayNotice(Boolean force)

Try to display the CMP; display is controlled by functional rules

Link copied to clipboard
@Deprecated(message = "The name of this method is not entirely clear on its execution.To avoid a breaking change, this one has been deprecated and another one has been implemented that executes the same functionality.This method will be removed in future releases", replaceWith = @ReplaceWith(imports = {}, expression = "this.isUserAcceptAll"), level = DeprecationLevel.WARNING)
public abstract Boolean userAcceptAll()

This method lets you know the status of your users' consent.

Link copied to clipboard
public abstract Boolean vendorAllowed(Integer vendorIabId)

Checks whether a IAB Vendor has been authorized