AppConsentSDK

public final class AppConsentSDK extends AbstractAppConsent

CMP entry point. This allows you to initiate the CMP when you need it, and to check that it has been properly initialized and started.

Once this has been done, all you need to do is retrieve the com.sfbx.appconsent.AppConsent object from the onReady Callback into AppConsentSDK.initialize method and display the CMP to your users.

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 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 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 Boolean allVendorsAllowed()

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

Link copied to clipboard
public 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 Unit clearCache()

Clear all applications SharedPreferences

Link copied to clipboard
public Unit clearConsent()

Clear user consent stored locally in applications SharedPreferences

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

Checks whether a consent has been authorized

Link copied to clipboard

Check if user gave consent

Link copied to clipboard

Checks whether an extra consent has been authorized

Link copied to clipboard

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

Link copied to clipboard

Checks whether a Extra Vendor has been authorized

Link copied to clipboard
@Deprecated(message = "This method will evolve over the next few releases, and is likely to be either discontinued or modified.")
public final static Unit forceInit()

WARNING! Please do not use this method unless our CMP logs webview error during your development phase.

Link copied to clipboard

Check if user gave consent for Geolocation purpose

Link copied to clipboard

Returns a list of consentables

Link copied to clipboard

Return a list of all Extra Vendors

Link copied to clipboard

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

Link copied to clipboard
public GCMStatus getGCMConsentStatus()

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

Link copied to clipboard
public final static AppConsent getInstance()

Retrieves the CMP if it has been initialized

Link copied to clipboard
public 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 final static Unit initialize(String appKey, Function1<AppConsent, Unit> onReady)
public final static Unit initialize(String appKey, ACConfiguration configuration, Function1<AppConsent, Unit> onReady)

The main method, which allows you to initialize AppConsent with a default configuration or a custom configuration ACConfiguration like theme AppConsentTVTheme or force the application of GRPD whatever the region for example. By default, you will only need the appKey provided by the SFBX platform AND the callback onReady.

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

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

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

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

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

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 final static Boolean isSdkInitialized()

Find out whether the CMP has already been initialized, and if so, enable you to retrieve it and start/continue using it.

Link copied to clipboard
public final static Boolean isSdkInitializing()

Shows whether the CMP is being initialized

Link copied to clipboard
@Deprecated(message = "This method will evolve over the next few releases, and is likely to be either discontinued or modified")
public final static Boolean isSdkOnError()

WARNING! Please do not use this method unless our CMP logs webview error during your development phase.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
public final Unit launchByUser(String appKey, AppConsentTVTheme theme, Boolean forceApplyGDPR, Function1<AppConsent, Unit> onReady)
Link copied to clipboard
public final static Unit loadContext(Context context)

WARNING! Please do not use this method unless our CMP stipulates it in error logs during your development phase.

Link copied to clipboard
public 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 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 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 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 final static Unit setErrorLogListener(AppConsentErrorListener appConsentErrorListener)

Set error log listener to help you to trace some error during using AppConsent. If you pass null you will remove the error log listener.

Link copied to clipboard
public 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 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 final static Unit setInformationLogListener(AppConsentLogListener appConsentLogListener)

Set information log listener to help you to trace some information logs during using AppConsent. If you pass null you will remove the error log listener.

Link copied to clipboard
public final static Unit setNavigationLogListener(AppConsentNavigationListener appConsentNavigationListener)

Set navigation log listener to help you to trace some navigation logs during using AppConsent. If you pass null you will remove the error log listener.

Link copied to clipboard
public Unit setOnPresentNoticeListener(OnPresentNoticeListener onPresentNoticeListener)

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

Link copied to clipboard
public Boolean stackAllowed(Integer stackId)

Checks whether a stack has been authorized

Link copied to clipboard

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 Boolean userAcceptAll()

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

Link copied to clipboard
public Boolean vendorAllowed(Integer vendorIabId)

Checks whether a IAB Vendor has been authorized