Public Member Functions | |
ACNotice (string appKey, bool forceApplyGDPR=false, bool forceATT=false, bool fullscreen=false, string dedicatedEndpointURL="", string dedicatedAssetsURL="") | |
Create an instance of ACNotice to be able to use AppConsent CMP later on. | |
void | InitACNotice () |
Setup the AppConsent CMP on ANDROID. | |
void | SetPresentNoticeListener (ISDKPresentNoticeListener sDKPresentNoticeListener) |
ANDROID ONLY ! | |
void | RemovePresentNoticeListener () |
ANDROID ONLY ! | |
bool | ShowNotice () |
Displays the CMP Notice if needed. | |
bool | ShowSettings () |
Displays the Privacy Settings. | |
void | ClearConsents () |
Clears user consents preferences. | |
bool | ConsentGiven () |
Get a boolean to know if the consent is already given. | |
bool | IsSubjectToGDPR () |
Get a boolean to know if device is running in a GDPR Countries. | |
bool | UserAcceptAll () |
Get a boolean to know if current user accept all consentables, stacks and vendors or not. | |
bool | AllConsentablesAllowed () |
Get a boolean to know if all consentables are allowed or not. | |
bool | ExtraVendorAllowed (string extraVendorId) |
Get a boolean to know if an extra vendor is allowed or not. | |
bool | ConsentableAllowed (int iabId, int consentableType) |
Get a boolean to know if a consentable is allowed or not. | |
Static Public Member Functions | |
static void | SetNoticeCallback (ISDKCallbackListener sdkCallback) |
ANDROID ONLY ! | |
Static Public Attributes | |
const string | PACKAGE_UNITY_PLAYER = "com.unity3d.player.UnityPlayer" |
|
inline |
Create an instance of ACNotice to be able to use AppConsent CMP later on.
Setup the CMP by calling this function, passing it your appKey
. The CMP detects if the app is running on a device that is inside a GDPR country, with forceApplyGDPR
you can choose to bypass the check, and let the CMP always behave according to GDPR. The ATT checks can be enforced with forceATT
, this defaults to false
.
On Android ONLY, you need to call the ACNotice::InitACNotice method, which initializes the CMP after creating the instance and passing it all the configuration parameters (appKey & forceApplyGDPR). On iOS, after creating this instance of ACNotice, you can start using it (ACNotice::showNotice, ACNotice::showSettings, ACNotice::consentGiven, ...).
appKey | The AppKey String from Back Office. |
forceApplyGDPR | Boolean to indicate if you want to force GDPR, if false AppConsent will check country to determine GDPR application, if true AppConsent will always behave as in a GDPR country. Defaults to false. |
forceATT | Boolean to indicate if you want to force App Tracking Transparency. Defaults to false. |
|
inline |
Get a boolean to know if all consentables are allowed or not.
|
inline |
Clears user consents preferences.
This only clears local consent in UserDefaults, all of the IABTCF UserDefaults are erased.
|
inline |
Get a boolean to know if a consentable is allowed or not.
iabId | Is an iabId |
consentableType | is an NSInteger (0 : purpose ,1 : feature , 2 : specialFeature ,3 : specialPurpose ) |
true
if consentable is allowed
|
inline |
Get a boolean to know if the consent is already given.
|
inline |
Get a boolean to know if an extra vendor is allowed or not.
extraVendorId | Is an extraId String |
|
inline |
Setup the AppConsent CMP on ANDROID.
For easier integration, this method can be used on both iOS and Android without making any distinction (it only works on ANDROID thanks to the constant UNITY_ANDROID Platform Dependent Compilation).
This method is MANDATORY on Android to initialize the CMP! Don't forget to define the initialization callback ACNotice::SetNoticeCallback to receive the callback indicating that the CMP is ready for use
|
inline |
Get a boolean to know if device is running in a GDPR Countries.
true
if current device is located in a country subject to GDPR
|
inline |
ANDROID ONLY !
For easier integration, this method can be used on both iOS and Android without making any distinction (it only works on ANDROID thanks to the constant UNITY_ANDROID Platform Dependent Compilation).
Remove the presentNotice callback (ISDKPresentNoticeListener)
|
inlinestatic |
ANDROID ONLY !
Defines the callback that lets you know when the SDK has finished initializing and is ready for use on ANDROID. You must call this method before calling ACNotice::InitACNotice if you want receive a callback.
sdkCallback | Your callback |
|
inline |
ANDROID ONLY !
For easier integration, this method can be used on both iOS and Android without making any distinction (it only works on ANDROID thanks to the constant UNITY_ANDROID Platform Dependent Compilation).
Defines the callback that lets you know when the user has completed the consent process. Once the callback has been called (ISDKPresentNoticeListener::onConsentGiven), you can start initializing your Advertising SDK.
sdkCallback | Your callback |
|
inline |
Displays the CMP Notice if needed.
Once the CMP has been initialized, call this to display the Notice UI. Internally, this function checks if a user has already saved their preferences:
This function returns as soon as the CMP Notice has been displayed, so when it returns, the user may not have saved their preferences yet.
|
inline |
Displays the Privacy Settings.
Once the CMP has been initialized, call this to display the Privacy Settings UI. Internally, this function checks if a user has already saved their preferences:
This function returns as soon as the CMP Notice has been displayed, so when it returns, the user may not have saved their preferences yet.
|
inline |
Get a boolean to know if current user accept all consentables, stacks and vendors or not.