AppConsent

public interface AppConsent

The interface contract that allows you to interact with CMP

Functions

Link copied to clipboard
public abstract Boolean allConsentablesAllowed()

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

Link copied to clipboard
public abstract Boolean allStacksAllowed()

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

Link copied to clipboard
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 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
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 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
public abstract Boolean userAcceptAll()

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

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

Checks whether a IAB Vendor has been authorized