MobileAds class

Warning.

This is an archived version of the documentation. Actual documentation for all platforms can be found here.

This class contains general Mobile Ads SDK settings.

Methods

void SetUserConsent(bool consent)

Sets a value that indicates whether a user from the GDPR region permits the collection of personal data that will be used for analytics and ad targeting. User data will not be collected until data collection is permitted. If the user once permitted or prohibited data collection, this value must be passed each time the app is launched.

void SetLocationConsent(bool consent)

It indicates if it's allowed to use a location to load targeted ads. By default, location data is not collected. In addition to getting the user's consent to collecting the location, you also need to request permission to access the location.

void SetAgeRestrictedUser(bool ageRestrictedUser)

The SDK automatically collects personal data if the user didn't restrict them. By default restriction is disabled.

void SetUserConsent(bool consent)

Sets a value that indicates whether a user from the GDPR region permits the collection of personal data that will be used for analytics and ad targeting. User data will not be collected until data collection is permitted. If the user once permitted or prohibited data collection, this value must be passed each time the app is launched.

void SetLocationConsent(bool consent)

It indicates if it's allowed to use a location to load targeted ads. By default, location data is not collected. In addition to getting the user's consent to collecting the location, you also need to request permission to access the location.

void SetAgeRestrictedUser(bool ageRestrictedUser)

The SDK automatically collects personal data if the user didn't restrict them. By default restriction is disabled.

Method description

void SetUserConsent(bool consent)

public static void SetUserConsent(bool consent)

Sets a value that indicates whether a user from the GDPR region permits the collection of personal data that will be used for analytics and ad targeting. User data will not be collected until data collection is permitted. If the user once permitted or prohibited data collection, this value must be passed each time the app is launched.

Parameters:
consent Permits or prohibits data collection. By default, data is not collected.
consent Permits or prohibits data collection. By default, data is not collected.

void SetLocationConsent(bool consent)

public static void SetLocationConsent(bool consent)

It indicates if it's allowed to use a location to load targeted ads. By default, location data is not collected. In addition to getting the user's consent to collecting the location, you also need to request permission to access the location.

Parameters:
consent The user's consent to collecting the location data. The default value is false.
consent The user's consent to collecting the location data. The default value is false.

void SetAgeRestrictedUser(bool ageRestrictedUser)

public static void SetAgeRestrictedUser(bool ageRestrictedUser)

The SDK automatically collects personal data if the user didn't restrict them. By default restriction is disabled.

Parameters:
ageRestrictedUser Restrict or allow collecting personal data. By default restriction is disabled.
ageRestrictedUser Restrict or allow collecting personal data. By default restriction is disabled.