-
- All Implemented Interfaces:
-
androidx.lifecycle.DefaultLifecycleObserver,androidx.lifecycle.LifecycleObserver,net.consentmanager.cm_sdk_android_v3.NetworkMonitorDelegate,net.consentmanager.cm_sdk_android_v3.WebViewManagerDelegate
public final class CMPManager implements WebViewManagerDelegate, NetworkMonitorDelegate, DefaultLifecycleObserver
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classCMPManager.Companion
-
Method Summary
-
-
Method Detail
-
setActivity
final Unit setActivity(Activity activity)
-
setWebView
final Unit setWebView(WebView webView)
-
getUserStatus
final UserConsentStatus getUserStatus()
-
getStatusForPurpose
final ConsentStatus getStatusForPurpose(String id)
-
getStatusForVendor
final ConsentStatus getStatusForVendor(String id)
-
exportCMPInfo
final String exportCMPInfo()
-
resetConsentManagementData
final Unit resetConsentManagementData()
-
getGoogleConsentModeStatus
final Map<String, String> getGoogleConsentModeStatus()
Returns a Map of consent settings compatible with Google Consent Mode v2. This map can be directly passed to Firebase Analytics' setConsent method.
-
checkAndOpen
final Unit checkAndOpen(Boolean jumpToSettings, Function1<Result<Unit>, Unit> completion)
-
checkAndOpen
final Result<Unit> checkAndOpen(Boolean jumpToSettings)
-
acceptVendors
final Unit acceptVendors(List<String> vendors, Function1<Result<Unit>, Unit> completion)
-
rejectVendors
final Unit rejectVendors(List<String> vendors, Function1<Result<Unit>, Unit> completion)
-
acceptPurposes
final Unit acceptPurposes(List<String> purposes, Boolean updatePurpose, Function1<Result<Unit>, Unit> completion)
-
rejectPurposes
final Unit rejectPurposes(List<String> purposes, Boolean updateVendor, Function1<Result<Unit>, Unit> completion)
-
onApplicationPause
final Unit onApplicationPause()
-
onApplicationResume
final Unit onApplicationResume()
-
didReceiveConsentMessage
Unit didReceiveConsentMessage(String consent, Map<String, Object> jsonObject)
-
didReceiveOpenMessage
Unit didReceiveOpenMessage()
-
didNotNeedOpenConsentLayer
Unit didNotNeedOpenConsentLayer()
-
didReceiveError
Unit didReceiveError(String error)
-
networkStatusDidChange
Unit networkStatusDidChange(Boolean isConnected)
-
onDestroy
Unit onDestroy(LifecycleOwner owner)
-
onResume
Unit onResume(LifecycleOwner owner)
-
onActivityDestroyed
final Unit onActivityDestroyed()
-
setOnClickLinkCallback
final Unit setOnClickLinkCallback(OnClickLinkCallback callback)
-
getOnClickLinkCallback
OnClickLinkCallback getOnClickLinkCallback()
-
checkIfConsentIsRequired
@Deprecated(message = Use getUserStatus() instead. This method will be removed in the next version., replaceWith = @ReplaceWith(imports = {}, expression = getUserStatus())) final Unit checkIfConsentIsRequired(Function1<Boolean, Unit> completion)
-
hasUserChoice
@Deprecated(message = Use getUserStatus() instead. This method will be removed in the next version., replaceWith = @ReplaceWith(imports = {}, expression = getUserStatus())) final Boolean hasUserChoice()
-
hasPurposeConsent
@Deprecated(message = Use getStatusForPurpose() instead. This method will be removed in the next version., replaceWith = @ReplaceWith(imports = {}, expression = getStatusForPurpose(id: String))) final Boolean hasPurposeConsent(String id)
-
hasVendorConsent
@Deprecated(message = Use getStatusForVendor() instead. This method will be removed in the next version., replaceWith = @ReplaceWith(imports = {}, expression = getStatusForVendor(id: String))) final Boolean hasVendorConsent(String id)
-
getAllPurposesIDs
@Deprecated(message = Use getUserStatus() instead. This method will be removed in the next version., replaceWith = @ReplaceWith(imports = {}, expression = getUserStatus())) final List<String> getAllPurposesIDs()
-
getEnabledPurposesIDs
@Deprecated(message = Use getUserStatus() instead. This method will be removed in the next version., replaceWith = @ReplaceWith(imports = {}, expression = getUserStatus())) final List<String> getEnabledPurposesIDs()
-
getDisabledPurposesIDs
@Deprecated(message = Use getUserStatus() instead. This method will be removed in the next version., replaceWith = @ReplaceWith(imports = {}, expression = getUserStatus())) final List<String> getDisabledPurposesIDs()
-
getAllVendorsIDs
@Deprecated(message = Use getUserStatus() instead. This method will be removed in the next version., replaceWith = @ReplaceWith(imports = {}, expression = getUserStatus())) final List<String> getAllVendorsIDs()
-
getEnabledVendorsIDs
@Deprecated(message = Use getUserStatus() instead. This method will be removed in the next version., replaceWith = @ReplaceWith(imports = {}, expression = getUserStatus())) final List<String> getEnabledVendorsIDs()
-
getDisabledVendorsIDs
@Deprecated(message = Use getUserStatus() instead. This method will be removed in the next version., replaceWith = @ReplaceWith(imports = {}, expression = getUserStatus())) final List<String> getDisabledVendorsIDs()
-
openConsentLayer
@Deprecated(message = Use forceOpen() instead. This method will be removed in the next version., replaceWith = @ReplaceWith(imports = {}, expression = forceOpen())) final Unit openConsentLayer(Function1<Result<Unit>, Unit> completion)
-
checkWithServerAndOpenIfNecessary
@Deprecated(message = Use checkAndOpen() instead, replaceWith = @ReplaceWith(imports = {}, expression = checkAndOpen(false, completion))) final Unit checkWithServerAndOpenIfNecessary(Function1<Result<Unit>, Unit> completion)
-
-
-
-