Package com.startapp.sdk.adsbase
Class StartAppSDK
java.lang.Object
com.startapp.sdk.adsbase.StartAppSDK
Class contains static methods to initialize and configure the Start.io SDK
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classProvides a convenient way to configure SDK parameters. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidenableReturnAds(boolean enableReturnAd) Deprecated.static voidDeprecated.static voidDeprecated.static voidinit(android.content.Context context, String appId, com.startapp.sdk.adsbase.SDKAdPreferences sdkAdPrefs) Deprecated.static voidinit(android.content.Context context, String appId, com.startapp.sdk.adsbase.SDKAdPreferences sdkAdPrefs, boolean enableReturnAds) Deprecated.static voidDeprecated.static voidDeprecated.static voidinit(android.content.Context context, String accountId, String appId, com.startapp.sdk.adsbase.SDKAdPreferences sdkAdPrefs) Deprecated.static voidinit(android.content.Context context, String accountId, String appId, com.startapp.sdk.adsbase.SDKAdPreferences sdkAdPrefs, boolean enableReturnAds) Deprecated.static StartAppSDK.InitParamsinitParams(android.content.Context context, String appId) Creates an intermediate object which holds parameters for SDK initialization.static voidsetTestAdsEnabled(boolean enable) Configure test ads.
-
Constructor Details
-
StartAppSDK
public StartAppSDK()
-
-
Method Details
-
init
Deprecated. UseinitParams(Context, String)instead.Initialize the SDK with default configuration.
- Parameters:
context- contextappId- app ID from the publisher's portal
-
init
public static void init(@NonNull android.content.Context context, @NonNull String appId, @NonNull com.startapp.sdk.adsbase.SDKAdPreferences sdkAdPrefs) Deprecated. UseinitParams(Context, String)instead.Initialize the SDK with customized configuration.
- Parameters:
context- contextappId- app ID from the publisher's portalsdkAdPrefs- default ad preferences
-
init
public static void init(@NonNull android.content.Context context, @Nullable String accountId, @NonNull String appId) Deprecated. UseinitParams(Context, String)instead.Initialize the SDK with default configuration.
- Parameters:
context- contextaccountId- account ID from the publisher's portalappId- app ID from the publisher's portal
-
init
public static void init(@NonNull android.content.Context context, @Nullable String accountId, @NonNull String appId, @NonNull com.startapp.sdk.adsbase.SDKAdPreferences sdkAdPrefs) Deprecated. UseinitParams(Context, String)instead.- Parameters:
context- contextaccountId- account ID from the publisher's portalappId- app ID from the publisher's portalsdkAdPrefs- ad preferences
-
init
@Deprecated public static void init(@NonNull android.content.Context context, @NonNull String appId, boolean enableReturnAds) Deprecated.Deprecated. UseinitParams(Context, String)instead. This method will be removed completely from future release of SDK 6.0.0.- Parameters:
context- contextappId- app ID from the publisher's portalenableReturnAds- this parameter is ignored and has no effect
-
init
@Deprecated public static void init(@NonNull android.content.Context context, @Nullable String accountId, @NonNull String appId, boolean enableReturnAds) Deprecated.Deprecated. UseinitParams(Context, String)instead. This method will be removed completely from future release of SDK 6.0.0.- Parameters:
context- contextaccountId- account ID from the publisher's portalappId- app ID from the publisher's portalenableReturnAds- this parameter is ignored and has no effect
-
init
@Deprecated public static void init(@NonNull android.content.Context context, @NonNull String appId, @NonNull com.startapp.sdk.adsbase.SDKAdPreferences sdkAdPrefs, boolean enableReturnAds) Deprecated.Deprecated. UseinitParams(Context, String)instead. This method will be removed completely from future release of SDK 6.0.0.- Parameters:
context- contextappId- app ID from the publisher's portalsdkAdPrefs- ad preferencesenableReturnAds- this parameter is ignored and has no effect
-
init
@Deprecated public static void init(@NonNull android.content.Context context, @Nullable String accountId, @NonNull String appId, @Nullable com.startapp.sdk.adsbase.SDKAdPreferences sdkAdPrefs, boolean enableReturnAds) Deprecated.Deprecated. UseinitParams(Context, String)instead. This method will be removed completely from future release of SDK 6.0.0.- Parameters:
context- contextaccountId- account ID from the publisher's portalappId- app ID from the publisher's portalsdkAdPrefs- ad preferencesenableReturnAds- this parameter is ignored and has no effect
-
enableReturnAds
Deprecated.This method does nothing and it will be removed completely from future release of SDK 6.0.0 -
setTestAdsEnabled
public static void setTestAdsEnabled(boolean enable) Configure test ads. Must be used during development.Example usage:
if (BuildConfig.DEBUG) { StartAppSDK.setTestAdsEnabled(true); }- Parameters:
enable-true- enabled,false- disabled
-
initParams
@NonNull public static StartAppSDK.InitParams initParams(@NonNull android.content.Context context, @NonNull String appId) Creates an intermediate object which holds parameters for SDK initialization.Example usage:
StartAppSDK.initParams(context, "YOUR_APP_ID") .setCallback(new Runnable() { public void run() { // request ads } }) .init();- Parameters:
context- contextappId- appId- Returns:
- new instance for method-chain calls
- See Also:
-