Package com.my.target.common
Class MyTargetManager
java.lang.Object
com.my.target.common.MyTargetManager
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetBidderToken(android.content.Context context) Obtaining a token for the server auction.static MyTargetConfigstatic voidinitSdk(android.content.Context context) Initializes sdk to make first ad request faster.static booleanReturns 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 Details
-
setDebugMode
public static void setDebugMode(boolean debugMode) Enable / disable debug mode (default false).- Parameters:
debugMode- enable or disable debug
-
getSdkConfig
- Returns:
- current SDK configuration instance
- See Also:
-
setSdkConfig
Configuration with global settings can be set to SDK. New config can be created withMyTargetConfig.Builder- Parameters:
config- SDK configuration instance- See Also:
-
getBidderToken
@WorkerThread @NonNull public static 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
-