Package 

Class MobileAds

  • All Implemented Interfaces:

    
    public final class MobileAds
    
                        

    Class contains logic that applies to the Mobile Ads SDK as a whole. Right now, the only methods in it are used for enabling SDK logs, getting SDK version and enabling visibility error indicator.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static void enableLogging(boolean enableLogging) Enables SDK logs.
      static void setLocationConsent(boolean locationConsent) Enables location usage for ad loading.
      static String getLibraryVersion() Returns the SDK version in the X.Y.Z format.
      static void enableDebugErrorIndicator(boolean enableIndicator) * Enable or disable visibility error indicator in Debug Mode.
      static void setUserConsent(boolean consent) Set a value indicating whether user from GDPR region allowed to collect personal data which is used for analytics and ad targeting.
      static void setAgeRestrictedUser(boolean ageRestictedUser) Set a value indicating whether user is a child or undefined age.
      static void initialize(@NonNull() Context context, @NonNull() InitializationListener initializationListener) Initializes the Yandex Mobile Ads SDK internal state.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • enableLogging

         static void enableLogging(boolean enableLogging)

        Enables SDK logs. Logs are disabled by default.

        Parameters:
        enableLogging - If set to true, logs will be enabled, otherwise disabled.
      • setLocationConsent

         static void setLocationConsent(boolean locationConsent)

        Enables location usage for ad loading. Disabled by default Location permission is still required to be granted additionally to the consent.

        Parameters:
        locationConsent - If set to true, location will be used for ads loading, otherwise not.
      • enableDebugErrorIndicator

         static void enableDebugErrorIndicator(boolean enableIndicator)

        * Enable or disable visibility error indicator in Debug Mode. Indicator is enabled by default.

        Parameters:
        enableIndicator - If set to true, visibility error indicator will be displayed, otherwise not.
      • setUserConsent

         static void setUserConsent(boolean consent)

        Set a value indicating whether user from GDPR region allowed to collect personal data which is used for analytics and ad targeting. If the value is set to false personal data will not be collected.

        Parameters:
        consent - true if user provided consent to collect personal data, otherwise false.
      • setAgeRestrictedUser

         static void setAgeRestrictedUser(boolean ageRestictedUser)

        Set a value indicating whether user is a child or undefined age. If the value is set to true personal data will not be collected.

        Parameters:
        ageRestictedUser - true if user falls under COPPA restrictions, otherwise false.
      • initialize

         static void initialize(@NonNull() Context context, @NonNull() InitializationListener initializationListener)

        Initializes the Yandex Mobile Ads SDK internal state.

        Parameters:
        context - The application context.
        initializationListener - A listener for receiving notifications about SDK initialization complete.