Class MyTargetManager


  • public final class MyTargetManager
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      MyTargetManager()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getBidderToken​(android.content.Context context)
      Obtaining a token for the server auction.
      static MyTargetConfig getSdkConfig()  
      static void initSdk​(android.content.Context context)
      Initializes sdk to make first ad request faster.
      static boolean isSdkInitialized()
      Returns the SDK initialization status
      static void setDebugMode​(boolean debugMode)
      Enable / disable debug mode (default false).
      static void setSdkConfig​(MyTargetConfig config)
      Configuration with global settings can be set to SDK.
      • Methods inherited from class java.lang.Object

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

      • MyTargetManager

        public MyTargetManager()
    • Method Detail

      • setDebugMode

        public static void setDebugMode​(boolean debugMode)
        Enable / disable debug mode (default false).
        Parameters:
        debugMode - enable or disable debug
      • setSdkConfig

        public static void setSdkConfig​(@NonNull
                                        MyTargetConfig config)
        Configuration with global settings can be set to SDK. New config can be created with MyTargetConfig.Builder
        Parameters:
        config - SDK configuration instance
        See Also:
        MyTargetConfig
      • getBidderToken

        @WorkerThread
        @NonNull
        public static java.lang.String getBidderToken​(@NonNull
                                                      android.content.Context context)
        Obtaining a token for the server auction. The method must be called from outside the main thread.

        This function returns one of two different tokens dependent on current value of MyTargetPrivacy.isConsent() flag from MyTargetPrivacy.currentPrivacy(). Both tokens are generated once per session and remain unchanged until the application is restarted.

        When working with a server-side auction, you must start loading an advertisement with the bid_payload received from the server, for this you need to use the loadFromBid method of the advertisement instance.

        Parameters:
        context - app context
        Returns:
        token for ad bidding
      • initSdk

        @AnyThread
        public static void initSdk​(@NonNull
                                   android.content.Context context)
        Initializes sdk to make first ad request faster.
        Parameters:
        context - app context
      • isSdkInitialized

        public static boolean isSdkInitialized()
        Returns the SDK initialization status