AppLift Android SDK

AppBrain AppLift: Integration with Unity

This tutorial describes how to integrate the AppBrain AppLift SDK into your Unity app and start monetizing it.

Unity integration steps:

  • Download the AppLift SDK from the AppLift GitHub page
  • Open Unity with your project, eg "MyProject"
  • The Unity related files are in the AppLift SDK in the unity/ directory. Copy these files (Ads.cs, AppBrain.cs, AndroidManifest.xml and appbrain-applift-sdk-VERSION.jar) to "MyProject"/Assets/Plugins/Android
  • Call AppLift functions where appropriate (see below)
  • If you use your own AndroidManifest.xml, please add the AppLift specific ones from our example one. Also add the following line to the Unity Player activity definition:

    <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />

The following example show calls to the AppLift functions (also in the file main.cs).

using UnityEngine;
using System.Collections;
using AppLift;

public class main : MonoBehaviour {
    void Start () {
        AppBrain.Init();
    }

    void Update () {
        if (Input.GetKeyUp(KeyCode.Escape)) {
        AppBrain.GetAds().ShowInterstitial(true);
        }
    }
}

Please also see the main AppBrain AppLift SDK page for further instructions how to use the SDK.


AppBrain SDK overview and documentation | SDK integration policy | SDK terms | AppLift javadoc