Skip to main content

MAS SDK Privacy Dialog

The MAS SDK provides a built-in privacy compliance dialog that automatically handles user age collection and consent management for COPPA, GDPR, and CCPA compliance. This dialog streamlines the legal compliance process by presenting users with an appropriate interface to collect necessary privacy information.

legal_full_popup.png

Enable SDK Privacy Dialog

To enable the SDK privacy dialog, call the following method before initializing the SDK:

Yodo1AdBuildConfig config = new Yodo1AdBuildConfig().enableUserPrivacyDialog(true);

// Update the agreement link
config = config.userAgreementUrl("Your user agreement url");

// Update the privacy link
config = config.privacyPolicyUrl("Your privacy policy url");

Yodo1U3dMas.SetAdBuildConfig(config);

Customize Dialog Appearance

The privacy dialog consists of three customizable sections:

  • Title section - Header area with the main title
  • Content section - Main body with privacy information
  • Button section - Action buttons for user interaction

legal_age_popup.jpeg

You can customize the background and text colors for each section:

Yodo1MasUserPrivacyConfig userPrivacyConfig = new Yodo1MasUserPrivacyConfig()
.titleBackgroundColor(Color.green)
.titleTextColor(Color.blue)
.contentBackgroundColor(Color.black)
.contentTextColor(Color.white)
.buttonBackgroundColor(Color.red)
.buttonTextColor(Color.green);

Yodo1AdBuildConfig config = new Yodo1AdBuildConfig()
.enableUserPrivacyDialog(true)
.userPrivacyConfig(userPrivacyConfig);

Yodo1U3dMas.SetAdBuildConfig(config);

Retrieve User Data

After the user completes the privacy dialog, you can access their age and ATT (App Tracking Transparency) status:

int age = Yodo1U3dMas.GetUserAge();

int attStatus = Yodo1U3dMas.GetAttrackingStatus();
switch(attStatus) {
case Yodo1U3dAttrackingStatus.NotDetermined: break;
case Yodo1U3dAttrackingStatus.Restricted: break;
case Yodo1U3dAttrackingStatus.Denied: break;
case Yodo1U3dAttrackingStatus.Authorized: break;
case Yodo1U3dAttrackingStatus.SystemLow: break; // iOS version below 14
}

How It Works

The MAS SDK privacy dialog automatically handles compliance requirements:

  • COPPA: Sets to false if user age ≥ 13, otherwise true
  • GDPR: Sets to true if user age ≥ 16 and consents to data collection, otherwise false
  • CCPA: Sets to false if user consents to data collection, otherwise true

The dialog ensures your app meets privacy regulations without requiring manual implementation of individual compliance frameworks.