Class AppBrain

java.lang.Object
com.appbrain.AppBrain

public class AppBrain extends Object
Entry point to the AppBrain SDK.
See Also:
  • Method Details

    • init

      public static void init(Context context)
      Initialize the AppBrain SDK. This method is best called in the onCreate() of any Activity where AppBrain is used. If your app has minSdkVersion 14 or higher, this method will be called automatically, so calling it from your activities is optional.
      Parameters:
      context - The Activity context.
    • initApp

      @Deprecated public static void initApp(Context context)
      Deprecated.
      This method is now called automatically. You can safely remove any calls to it from your app.
      Initialize the AppBrain SDK. This method is especially meant for your Application.onCreate(). Because it's not called from an Activity, the analytics will not count this user as active in your app (because the Application can be started because of a broadcast receiver or service for instance.
      Parameters:
      context - The context of the Android app.
    • addTestDevice

      public static void addTestDevice(String deviceId)
      Put a device in test mode. In test mode random cloud alerts will be shown.
      Parameters:
      deviceId - Your device ID, which can be found in the logcat output when debugging on your device.
    • getAds

      public static AdService getAds()
      Get an AdService implementation, which allows you to show AppBrain Promoted Apps.
      Returns:
      An AdService implementation
    • getSettings

      public static RemoteSettings getSettings()
      Get the values that were set on the server.
      Returns:
      An object containing all values that were set on the server.
    • getAdvertiserService

      public static AdvertiserService getAdvertiserService()
      Gets an AdvertiserService implementation, which allows you to send conversion events to AppBrain.
      Returns:
      An AdvertiserService implementation