Package com.my.target.common
Class MyTargetManager
- java.lang.Object
-
- com.my.target.common.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.StringgetBidderToken(android.content.Context context)Obtaining a token for the server auction.static MyTargetConfiggetSdkConfig()static voidinitSdk(android.content.Context context)Initializes sdk to make first ad request faster.static booleanisSdkInitialized()Returns the SDK initialization statusstatic voidsetDebugMode(boolean debugMode)Enable / disable debug mode (default false).static voidsetSdkConfig(MyTargetConfig config)Configuration with global settings can be set to SDK.
-
-
-
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 withMyTargetConfig.Builder- Parameters:
config- SDK configuration instance- See Also:
MyTargetConfig
-
getSdkConfig
@NonNull public static MyTargetConfig getSdkConfig()
- Returns:
- current 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 fromMyTargetPrivacy.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
-
-