Class StartAppSDK

java.lang.Object
com.startapp.sdk.adsbase.StartAppSDK

public class StartAppSDK extends Object
Class contains static methods to initialize and configure the Start.io SDK
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Provides a convenient way to configure SDK parameters.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    enableReturnAds(boolean enableReturnAd)
    Deprecated.
    static void
    init(android.content.Context context, String appId)
    Deprecated.
    static void
    init(android.content.Context context, String appId, boolean enableReturnAds)
    Deprecated.
    static void
    init(android.content.Context context, String appId, com.startapp.sdk.adsbase.SDKAdPreferences sdkAdPrefs)
    Deprecated.
    static void
    init(android.content.Context context, String appId, com.startapp.sdk.adsbase.SDKAdPreferences sdkAdPrefs, boolean enableReturnAds)
    Deprecated.
    static void
    init(android.content.Context context, String accountId, String appId)
    Deprecated.
    static void
    init(android.content.Context context, String accountId, String appId, boolean enableReturnAds)
    Deprecated.
    static void
    init(android.content.Context context, String accountId, String appId, com.startapp.sdk.adsbase.SDKAdPreferences sdkAdPrefs)
    Deprecated.
    static void
    init(android.content.Context context, String accountId, String appId, com.startapp.sdk.adsbase.SDKAdPreferences sdkAdPrefs, boolean enableReturnAds)
    Deprecated.
    initParams(android.content.Context context, String appId)
    Creates an intermediate object which holds parameters for SDK initialization.
    static void
    setTestAdsEnabled(boolean enable)
    Configure test ads.

    Methods inherited from class java.lang.Object

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

    • StartAppSDK

      public StartAppSDK()
  • Method Details

    • init

      public static void init(@NonNull android.content.Context context, @NonNull String appId)
      Deprecated. Use initParams(Context, String) instead.

      Initialize the SDK with default configuration.

      Parameters:
      context - context
      appId - 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. Use initParams(Context, String) instead.

      Initialize the SDK with customized configuration.

      Parameters:
      context - context
      appId - app ID from the publisher's portal
      sdkAdPrefs - default ad preferences
    • init

      public static void init(@NonNull android.content.Context context, @Nullable String accountId, @NonNull String appId)
      Deprecated. Use initParams(Context, String) instead.

      Initialize the SDK with default configuration.

      Parameters:
      context - context
      accountId - account ID from the publisher's portal
      appId - 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. Use initParams(Context, String) instead.
      Parameters:
      context - context
      accountId - account ID from the publisher's portal
      appId - app ID from the publisher's portal
      sdkAdPrefs - ad preferences
    • init

      @Deprecated public static void init(@NonNull android.content.Context context, @NonNull String appId, boolean enableReturnAds)
      Deprecated.
      Deprecated. Use initParams(Context, String) instead. This method will be removed completely from future release of SDK 6.0.0.
      Parameters:
      context - context
      appId - app ID from the publisher's portal
      enableReturnAds - 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. Use initParams(Context, String) instead. This method will be removed completely from future release of SDK 6.0.0.
      Parameters:
      context - context
      accountId - account ID from the publisher's portal
      appId - app ID from the publisher's portal
      enableReturnAds - 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. Use initParams(Context, String) instead. This method will be removed completely from future release of SDK 6.0.0.
      Parameters:
      context - context
      appId - app ID from the publisher's portal
      sdkAdPrefs - ad preferences
      enableReturnAds - 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. Use initParams(Context, String) instead. This method will be removed completely from future release of SDK 6.0.0.
      Parameters:
      context - context
      accountId - account ID from the publisher's portal
      appId - app ID from the publisher's portal
      sdkAdPrefs - ad preferences
      enableReturnAds - this parameter is ignored and has no effect
    • enableReturnAds

      @Deprecated public static void enableReturnAds(boolean enableReturnAd)
      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 - context
      appId - appId
      Returns:
      new instance for method-chain calls
      See Also: