public class

AppBrain

extends Object
java.lang.Object
   ↳ com.appbrain.AppBrain

Class Overview

Entry point to the AppBrain AppLift SDK. For any method you call, init(context) always needs to be called first. It's strongly advised to put this into your onCreate of all your Activities, or of your Application object if you have one. If you put this in your Activities' onCreate, don't forget to also check your Services and BroadcastReceivers for potential other entry points into your app. Otherwise you can call AppBrain.init(context) right before any calls to getAds or getSettings, but in that case you won't get an accurate number of active users, and loading of remote settings will be less frequent.

Summary

Public Methods
static AdService getAds()
Get an AdService implementation, which allows you to show AppBrain Promoted Apps.
static RemoteSettings getSettings()
Get the values that were set on the server.
static void init(Context context)
Initialize the AppBrain AppLift SDK.
static void initApp(Context context)
Initialize the AppBrain AppLift SDK.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static AdService getAds ()

Get an AdService implementation, which allows you to show AppBrain Promoted Apps. AppBrain.init needs to be called before this method!

Returns
  • An AdService implementation

public static RemoteSettings getSettings ()

Get the values that were set on the server. AppBrain.init needs to be called before this method!

Returns
  • An object containing all values that were set on the server.

public static void init (Context context)

Initialize the AppBrain AppLift SDK. This method is best called in the onCreate() of your main Activity.

Parameters
context The Activity context.

public static void initApp (Context context)

Initialize the AppBrain AppLift 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.