Class MobileAds

com.yandex.mobile.ads

public class MobileAds

This class contains general Mobile Ads SDK settings.

Methods

void enableDebugErrorIndicator(final boolean enableIndicator)

Toggles the mode for displaying the integration error indicator during debugging.

void enableLogging(final boolean enableLogging)

Toggles the logging mode.

String getLibraryVersion()

Returns the SDK version in the X.YY or X.YY-status-Z format.

void setUserConsent(final boolean 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.

Method Detail

enableDebugErrorIndicator

public static void enableDebugErrorIndicator (final boolean enableIndicator)

Toggles the mode for displaying the integration error indicator during debugging.

Parameters:
enableIndicator
Toggle for the indicator display mode. Acceptable values:
  • true — The indicator is enabled.

  • false — The indicator is disabled.

The default value is false.

enableLogging

public static void enableLogging (final boolean enableLogging)

Toggles the logging mode.

By default, logging is disabled.
Parameters:
enableLogging
Toggle for logging mode. Acceptable values:
  • true — Enable logging.

  • false — Disable logging.

The default value is false.

getLibraryVersion

public static String getLibraryVersion ()

Returns the SDK version in the X.YY or X.YY-status-Z format.

Returns:

SDK version in the X.YY or X.YY-status-Z format.

setUserConsent

public static void setUserConsent (final boolean 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.