AppConsentImpl

public abstract class AppConsentImpl implements AppConsent

Functions

Link copied to clipboard
public Unit addGeolocationListener(AppConsentLocationListener listener)
Link copied to clipboard
public Unit addNoticeListener(AppConsentNoticeListener listener)
Link copied to clipboard
public Boolean allConsentablesAllowed()
Link copied to clipboard
public Boolean allStacksAllowed()
Link copied to clipboard
public Boolean allVendorsAllowed()
Link copied to clipboard
public Unit checkForUpdate(AppConsentUpdateCallback callback)

Check if update is needed. If called prior to user giving a consent returns false

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

Clear configuration cache and user consent stored locally in applications SharedPreferences

Link copied to clipboard
public Unit clearConsent()

Clear user consent stored locally in applications SharedPreferences

Link copied to clipboard
@Deprecated(message = "Don't use it !", replaceWith = @ReplaceWith(imports = {}, expression = "consentableAllowed(iabId: Int, consentableType: ConsentableType)"), level = DeprecationLevel.WARNING)
public Boolean consentableAllowed(Integer iabId)
public Boolean consentableAllowed(Integer iabId, ConsentableType consentableType)

Check if Consentable is ALLOWED

Link copied to clipboard
public Boolean consentGiven()

Check if user saved consent preferences.

Link copied to clipboard
public Boolean extraConsentableAllowed(String extraId)

Check if extra Consentable is ALLOWED

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

Check if extra Vendor is ALLOWED

Link copied to clipboard
public Boolean geolocationConsentGiven()

Check if user gave consent for Geolocation purpose

Link copied to clipboard
public List<ExportConsentable> getAllConsentables(ConsentStatus consentStatus)

Return a Map of all consentables ids and status

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

Return a list of all vendors

Link copied to clipboard
@Deprecated(message = "Don't use it !", replaceWith = @ReplaceWith(imports = {}, expression = "externalIds"), level = DeprecationLevel.WARNING)
public Map<String, Object> getExternalData()

Get external data sent to server

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

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

Link copied to clipboard
public Boolean isFloatingNeedUpdate()
Link copied to clipboard
public Boolean isLimitedTrackingEnabled()

Return true if limited ad tracking is enabled, false otherwise

Link copied to clipboard
public Boolean isSubjectToGDPR()

Return true if user is subject to GDPR. It depends on forceApplyGDPR and phone's locale.

Link copied to clipboard
public Unit onCoreReady()
Link copied to clipboard
public final Boolean presentGeolocationNotice(Boolean force)

Present geolocation notice with only geolocation market and ad purposes

Link copied to clipboard
public final Boolean presentNotice(Boolean force)

Present Notice

Link copied to clipboard
public Unit removeGeolocationListener(AppConsentLocationListener listener)

Remove geolocation notice listener.

Link copied to clipboard
public Unit removeNoticeListener(AppConsentNoticeListener listener)

Remove notice listener.

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

Save current State and send it to server

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

Send floating purposes to the server

Link copied to clipboard
public Unit setConsentableConsents(Map<Integer, ConsentStatus> consents, AppConsentSetConsentableConsentsCallback callback)

Set consent by consentable.

public Unit setConsentableConsents(    Map<Integer, ConsentStatus> consents,     Function0<Unit> success,     Function1<Throwable, Unit> error)
Link copied to clipboard
@Deprecated(message = "Don't use it !", replaceWith = @ReplaceWith(imports = {}, expression = "externalIds"), level = DeprecationLevel.WARNING)
public Unit setExternalData(Map<String, Object> map)

Send external data to server

Link copied to clipboard
public final Unit setExternalIds(Map<String, String> externalIds)
Link copied to clipboard
public Unit setExtraConsentableConsents(Map<String, ConsentStatus> consents, AppConsentSetConsentableConsentsCallback callback)

Set Consent by extra consentable.

public Unit setExtraConsentableConsents(    Map<String, ConsentStatus> consents,     Function0<Unit> success,     Function1<Throwable, Unit> error)
Link copied to clipboard
public Boolean stackAllowed(Integer stackId)

Check if Stack is ALLOWED

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

Check if Vendor is ALLOWED

Properties

Link copied to clipboard
private Map<String, String> externalIds