Integration Guides


Unity - version 9.2.1

Full Guide

Getting Started

Ad Unit

Advanced

SDK Package

1 Configuration

Requirement: Unity 3.5.6+

You can integrate Revmob Unity SDK using C# or Javascript on apps for Androidand/or iOS.

  1. Add your app to our system and get your App ID.
  2. Download the latest version of the SDK.
  3. Import it as a Custom Package.

Be aware to test only on devices. The ads will not be shown in Unity editor or XCode simulators.
To build locally, check "Development Build".

iOS

To build for iOS on Unity 5, you need to disable ARC on RevMobUnityiOSBinding.m. You can do that through Unity OR XCode:.

  • Disabling ARC through Unity: Find it on Assets/Plugins/iOS and click on it. In the Inspector, Platform Settings, find Compile Flags, add -fno-objc-arc and Apply.
  • Disabling ARC through XCode: Click on your project and go to Build Phases. Under "Compile Sources", double click on RevMobUnityiOSBinding.m and add -fno-objc-arc.

To build your app with Revmob for iOS, you must have the XCode 4.4.1+.

On XCode:
It's necessary to include the frameworks AdSupport and StoreKit. You can do that by clicking in the project root, Build Phases, Link Binary With Libraries, click on the + button, and choose the frameworks.
You can also do this by clicking on Editor, Add Build Phase, Add Link Binary With Library Phase.

unity1

Android

If you don't already have an AndroidManifest.xml file, build your project for Android to generate it.
Add the required permission in your AndroidManifest.xml file by putting the following code inside the manifest tag.

<!-- Required -->
<uses-permission android:name="android.permission.INTERNET"/>
			

Add the required Revmob activity in the application node if you will use Fullscreen, Video or Rewarded Video ad units:

<application>
<activity android:name="com.revmob.FullscreenActivity"
	android:theme="@android:style/Theme.Translucent"
	android:configChanges="keyboardHidden|orientation">
</activity>
</application>
			
storekit

2 Start Session

In order to display ads utilizing our SDK, you must call its methods from a Script attached to a GameObject.
Before displaying any ads, you must start a new session, initializing the SDK.
It's a best practice to do that as soon as your app is ready, so you can call ads easily whenever you want to.
To start using Revmob for Unity, you need to instantiate the Revmob instance in accordance to the deploy device. A good place to start it is in the Awake() method of your GameObject:

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameObject : MonoBehaviour {
    private static readonly Dictionary<String, String> REVMOB_APP_IDS = new Dictionary<String, String>() {
        { "Android", "<YOUR_APP_ID_ANDROID>"},
        { "IOS", "<YOUR_APP_ID_IOS>" }
    };
    private RevMob revmob;

    void Awake() {
        revmob = RevMob.Start(REVMOB_APP_IDS, "<YOUR_GAMEOBJECT_NAME>");
    }
}
            

This is very similar using Javascript:

import System.Collections.Generic;
private var REVMOB_APP_IDS = new Dictionary.<String, String>();
REVMOB_APP_IDS["Android"] = "<YOUR_APP_ID_ANDROID>";
REVMOB_APP_IDS["IOS"] = "<YOUR_APP_ID_IOS>";
private var revmob:RevMob;

function Awake() {
    revmob = RevMob.Start(REVMOB_APP_IDS, "<YOUR_GAMEOBJECT_NAME>");
}
            

3 Testing

While you're developing your app, you will only receive test ads. Your app must make at least one ad request while on test mode in order to be validated before receiving live ads. Be sure you are able to receive at least one of our sample ads and that it’s redirecting to our "Success Page" when clicked. Once you are able to receive our sample ads it means you’ve successfully integrated our sdk.

sample_ads

Fullscreen sample, Banner sample, and Success Page

4 Go Live

Once you're finished and your app is in the store with our SDK, click on the "Go live" button in your Apps page and insert your app's URL. It may take up to 48h for your app to be approved. After that, it will start receiving live ads.

app_store_idfa

5 Upload to App Store

When uploading your app to App Store with Revmob SDK, you will be asked about the use of IDFA.
Revmob uses IDFA for targeting purposes. Check "Yes" on the option at the right side of the page, as it will improve your earnings a lot.
Then, on the last three checkboxes:

  1. Check this box to serve ads.
  2. Check this box if you are also advertising the app you are uploading, and its installations will be tracked.
  3. This check is optional, as it's not used by Revmob.
app_store_idfa

1 Native Button

You have full control over this ad unit's layout. You design it, attach our method to its click event and the user will be redirected to the Store.

Implementation

Revmob's native button/link works just like a URL. You design the button's layout and call our method once it's clicked.
Keep in mind that the button must be clearly identified as an advertising.
Make sure to call it only after Revmob's session is started. You can do that by checking if "revmob" object has been created or through Revmob's listeners.
The best implementation is to pre-cache the URL and only display the button when receiving its AdDidReceive callback.
In this example, the RevMobLink object is created as soon as the session is started. This condition is verified once the SessionIsStarted() method is called by our SDK. Once the object is created, it will load an ad automatically.
As soon as the ad is loaded, the AdDidReceive listener will be called. Inside this method, the revMobAdType parameter is verified, confirming that the ad received is a Link.
Once it's loaded, the ad can be open when your button is clicked.
You can learn more about how to implement the listeners here.

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameObject : MonoBehaviour, IRevMobListener {
    private static readonly Dictionary<String, String> REVMOB_APP_IDS = new Dictionary<String, String>() {
        { "Android", "<YOUR_APP_ID_ANDROID>"},
        { "IOS", "<YOUR_APP_ID_IOS>" }
    };
    private RevMob revmob;
    private RevMobLink link;
    void Awake() {
        revmob = RevMob.Start(REVMOB_APP_IDS, "<YOUR_GAMEOBJECT_NAME>");
    }
    #region IRevMobListener implementation
    public void SessionIsStarted() {
        link = revmob.CreateLink();
    }
    public void AdDidReceive(string revMobAdType) {
        //Your button can be displayed inside this method
        if (revMobAdType.Equals ("Link", StringComparison.Ordinal) && link != null)
            link.Open();
            //The link.Open() method shall be called on your button click listener
    }
    //You must also implement all the other listeners
    #endregion
}
            

Keep in mind that the image associated with this link must be clearly identified as an advertising.
To get better eCPMs, edit its layout to best fit your app's.

ant_smasher_native

100-million-downloads Ant Smasher's success case.

2 Fullscreen

The Interstitial is an advertisement that fills the whole screen. It's usually shown:

  1. On app start;
  2. Before/after a game round;
  3. After a service is used (e.g. alarm turned off).

When pre-caching, the ad received can either be a static interstitial or a video ad. Our servers will always return the one that can pay you more.

For Android only

It's necessary to add the Revmob activity in AndroidManifest.xml.Just add the following code in the application tag:

<application>
    <activity
            android:name="com.revmob.FullscreenActivity"
            android:configChanges="keyboardHidden|orientation" >
    </activity>
</application>
            

Sample Code

Make sure to call it only after Revmob's session is started. You can do that by checking if "revmob" object has been created or through Revmob's listeners.
In this example, the RevMobFullscreen object is created as soon as the session is started. This condition is verified once the SessionIsStarted() method is called by our SDK. Once the object is created, it will load an ad automatically.
You can learn more about how to implement listeners here.
As soon as the ad is loaded, the AdDidReceive listener will be called. Inside this method, the revMobAdType parameter is verified, confirming that the ad received is a fullscreen.
In the example below, once loaded, the ad can be displayed at any time despite being displayed as soon as it is received.

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameObject : MonoBehaviour, IRevMobListener {
    private static readonly Dictionary<String, String> REVMOB_APP_IDS = new Dictionary<String, String>() {
        { "Android", "<YOUR_APP_ID_ANDROID>"},
        { "IOS", "<YOUR_APP_ID_IOS>" }
    };
    private RevMob revmob;
    private RevMobFullscreen fullscreen;
    void Awake() {
        revmob = RevMob.Start(REVMOB_APP_IDS, "<YOUR_GAMEOBJECT_NAME>");
    }
    #region IRevMobListener implementation
    public void SessionIsStarted() {
        fullscreen = revmob.CreateFullscreen();
    }
    public void AdDidReceive(string revMobAdType) {
        if (revMobAdType.Equals ("Fullscreen", StringComparison.Ordinal) && fullscreen != null)
            fullscreen.Show();
    }
    //You must also implement all the other listeners
    #endregion
}
            
ant_smasher_fullscreen

Revmob's test Fullscreen ad.

3 Banner

Banner ad is an Ad Unit that has a standard size of 320x50 for phones and 728x90 for tablets, though you can customize its size for your app.
A banner on the bottom of screen is displayed through the following method:

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameObject : MonoBehaviour, IRevMobListener {
    private static readonly Dictionary<String, String> REVMOB_APP_IDS = new Dictionary<String, String>() {
        { "Android", "<YOUR_APP_ID_ANDROID>"},
        { "IOS", "<YOUR_APP_ID_IOS>" }
    };
    private RevMob revmob;
    private RevMobBanner banner;
    void Awake() {
        revmob = RevMob.Start(REVMOB_APP_IDS, "<YOUR_GAMEOBJECT_NAME>");
    }
    #region IRevMobListener implementation
    public void SessionIsStarted() {
        #if UNITY_ANDROID
            banner = revmob.CreateBanner();
            banner.Show();
        #elif UNITY_IPHONE
        //This array must contain your app orientations. 
        //They can be the following: ScreenOrientation.LandscapeLeft, ScreenOrientation.LandscapeRight, ScreenOrientation.Portrait, ScreenOrientation.PortraitUpsideDown
        //If this parameter is null, the banner will rotate along with the device, regardless of your app configurations.
            ScreenOrientation[] orientation = new ScreenOrientation[] { ScreenOrientation.LandscapeLeft, ScreenOrientation.PortraitUpsideDown};
            banner = revmob.CreateBanner(orientation);
            banner.Show();
        #endif
    }
    public void AdDisplayed(string revMobAdType) {
        if (revMobAdType.Equals (RevMob.ADTYPE.BANNER, StringComparison.Ordinal))
            Debug.Log(">>> AdDisplayed: " + revMobAdType);
    }
    //You must also implement all the other listeners
    #endregion
}
            

You can also call methods to hide the Banner:

public void hideBanner(){
    banner.Hide();
    //To display the banner again, use banner.Show();
}
            

To remove the banner, you need to release it:

public void releaseBanner(){
    banner.Release();
    banner = null;
}
            

Custom Size and Position

Android

The leftMargin and topMargin parameters are the distance from the left and top margin of the screen, in pixels.
The width and height parameters are the banner dimensions, also in pixels.
Note: The banner will always keep its Aspect Ratio, meaning if the container's dimensions are not proportional to the banner default dimensions, the container won't be filled completely. The banner will adjust its size to one of the dimensions. Keep that in mind when designing your app's interface.

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameObject : MonoBehaviour, IRevMobListener {
    private static readonly Dictionary<String, String> REVMOB_APP_IDS = new Dictionary<String, String>() {
        { "Android", "<YOUR_APP_ID_ANDROID>"},
        { "IOS", "<YOUR_APP_ID_IOS>" }
    };
    private RevMob revmob;
    private RevMobBanner customBanner;
    void Awake() {
        revmob = RevMob.Start(REVMOB_APP_IDS, "<YOUR_GAMEOBJECT_NAME>");
    }
    #region IRevMobListener implementation
    public void SessionIsStarted() {
        loadCustomBanner();
    }
    public void AdDidReceive(string revMobAdType) {
        if (revMobAdType.Equals(RevMob.ADTYPE.BANNER, StringComparison.Ordinal)){
            customBanner.Show();
        } 
    }
    //Note: You must also implement all the other listeners
    #endregion
    public void loadCustomBanner(){
        #if UNITY_ANDROID
            //Parameters: (int leftMargin, int topMargin, int width, int height)
            //This example displays a banner 320x50 pixels sized.
            int height = 50;
            int width = 320;
            customBanner = revmob.CreateBanner((Screen.width - width)/2,Screen.height - height, width, height);
        #endif
    }
    public void hideCustomBanner(){
        //This banner is hidden the same way as the basic banner:
        customBanner.Hide();
        //In order to display it again use customBanner.Show();
    }
    void releaseCustomBanner(){
        customBanner.Release();
        customBanner = null;
    }
}
            

Extra Settings for Android

You're required to add unityplayer.ForwardNativeEventsToDalvik in AndroidManifest.xml.
If you are using Unity 4.5 or above, put this flag on UnityPlayerNativeActivity:

<activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
    <meta-data android:name="android.app.lib_name" android:value="unity" />
    <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
</activity>
            

If you are using Unity 4.3, put this flag on UnityPlayerProxyActivity:

<activity android:name="com.unity3d.player.UnityPlayerProxyActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
</activity>
            

If you are using Unity 4.2 or bellow, put this flag on UnityPlayerNativeActivity:


<activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
    <meta-data android:name="android.app.lib_name" android:value="unity" />
    <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
</activity>
            

iOS:

For iOS, an extra parameter can be passed to a banner instance: an ScreenOrientation array.
This array can contain the following parameters: ScreenOrientation.Portrait, ScreenOrientation.LandscapeLeft, ScreenOrientation.LandscapeRight and ScreenOrientation.PortraitUpsideDown.
These parameters limit the orientations where your banner will be presented.
Note: If no orientation is set the banner will rotate along with the device, regardless of you app's orientation.
The following example shows a basic banner on bottom with orientations constrained to LandscapeLeft and LandscapeRight:

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameObject : MonoBehaviour, IRevMobListener {
    private static readonly Dictionary<String, String> REVMOB_APP_IDS = new Dictionary<String, String>() {
        { "Android", "<YOUR_APP_ID_ANDROID>"},
        { "IOS", "<YOUR_APP_ID_IOS>" }
    };
    private RevMob revmob;
    private RevMobBanner bannerForOrientation;
    void Awake() {
        revmob = RevMob.Start(REVMOB_APP_IDS, "<YOUR_GAMEOBJECT_NAME>");
    }
    #region IRevMobListener implementation
    public void SessionIsStarted() {
        loadCustomBanner();
    }
    public void AdDidReceive(string revMobAdType) {
        if (revMobAdType.Equals(RevMob.ADTYPE.BANNER, StringComparison.Ordinal)){
            bannerForOrientation.Show();
        } 
    }
    //Note: You must also implement all the other listeners
    #endregion
    public void loadCustomBanner(){
        #if UNITY_IPHONE
            ScreenOrientation[] orientation = new ScreenOrientation[] { ScreenOrientation.LandscapeLeft, ScreenOrientation.LandscapeRight}; //Set the same orientations of your app.
            bannerForOrientation = revmob.CreateBanner(orientation);
        #endif
    }
    public void hideCustomBanner(){
        //This banner is hidden the same way as the basic banner:
        bannerForOrientation.Hide();
        //To display it again, use bannerForOrientation.Show();
    }
    public void releaseCustomBanner(){
        bannerForOrientation.Release();
        bannerForOrientation = null;
    }
}
            

A banner with custom size and position can also be displayed.
In this case, the x and y parameters are the position related to the Top Left Corner of the screen.
The width and height are the banner dimensions.
All dimensions are set in DPI.

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameObject : MonoBehaviour, IRevMobListener {
    private static readonly Dictionary<String, String> REVMOB_APP_IDS = new Dictionary<String, String>() {
        { "Android", "<YOUR_APP_ID_ANDROID>"},
        { "IOS", "<YOUR_APP_ID_IOS>" }
    };
    private RevMob revmob;
    private RevMobBanner bannerForOrientation;
    void Awake() {
        revmob = RevMob.Start(REVMOB_APP_IDS, "<YOUR_GAMEOBJECT_NAME>");
    }
    #region IRevMobListener implementation
    public void SessionIsStarted() {
        loadCustomBanner();
    }
    public void AdDidReceive(string revMobAdType) {
        if (revMobAdType.Equals(RevMob.ADTYPE.BANNER, StringComparison.Ordinal)){
            bannerForOrientation.Show();
        } 
    }
    //Note: You must also implement all the other listeners
    #endregion
    public void loadCustomBanner(){
        #if UNITY_IPHONE
        //Parameters passed to this method: CreateBanner(float x, float y, float width, float height,ScreenOrientation[] orientations)
            ScreenOrientation[] orientation = new ScreenOrientation[]{ ScreenOrientation.Portrait};
            bannerForOrientation = revmob.CreateBanner(10, 20, 200, 40,orientation);//The Screen Orientation Array can also be set to null, despite not recommended
        #endif
    }
    public void hideCustomBanner(){
        //This banner is hidden the same way as the basic banner:
        bannerForOrientation.Hide();
        //To display it again, use bannerForOrientation.Show();
    }
    public void releaseCustomBanner(){
        bannerForOrientation.Release();
        bannerForOrientation = null;
    }
}
            
ant_smasher_banner

100-million-downloads Ant Smasher's home menu banner.

4 Video

For Android only

It's necessary to add the Revmob activity in AndroidManifest.xml.Just add the following code in the application tag:

<application>
    <activity
            android:name="com.revmob.FullscreenActivity"
            android:configChanges="keyboardHidden|orientation" >
    </activity>
</application>
            

Example Code

You have to call the createVideo method to pre-cache it before the ShowVideo. A good place to do that is as soon as the session is started, in the StartSession() callback.
Please note that the video object is a RevmobFullscreen object.
Make sure to call it only after Revmob's session is started. You can do that by checking if "revmob" object has been created or through Revmob's listeners.
In this example, the video object is created as soon as the session is started. This condition is verified once the SessionIsStarted() method is called by our SDK. Once the object is created, it will load an ad automatically.
The VideoLoaded() listener method is called once the video is loaded. You can learn more about how to implement the Listeners here.
Despite being shown as soon as it is loaded in the example, the ad can be displayed at any time after the load is completed.

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameObject : MonoBehaviour, IRevMobListener {
    private static readonly Dictionary<String, String> REVMOB_APP_IDS = new Dictionary<String, String>() {
        { "Android", "<YOUR_APP_ID_ANDROID>"},
        { "IOS", "<YOUR_APP_ID_IOS>" }
    };
    private RevMob revmob;
    private RevMobFullscreen video;
    void Awake() {
        revmob = RevMob.Start(REVMOB_APP_IDS, "<YOUR_GAMEOBJECT_NAME>");
    }
    #region IRevMobListener implementation
    public void SessionIsStarted() {
        video = revmob.CreateVideo();
    }
    public void VideoLoaded() {
        if(video != null) video.ShowVideo();
    }
    //You must also implement all the other listeners
    #endregion
}
            

Video Listeners

You can learn more about how to implement listeners here.
These are all the Video specific listeners:

public void VideoLoaded() {
        Debug.Log(">>> VideoLoaded");
    }
    public void VideoNotCompletelyLoaded() {
        Debug.Log(">>> VideoNotCompletelyLoaded");
    }
    public void VideoStarted() {
        Debug.Log(">>> VideoStarted");
    }
    public void VideoFinished() {
        Debug.Log(">>> VideoFinished");
    }
            
ant_smasher_video

Revmob's Video test ad

5 Rewarded Video

Rewarded Video ads are offered as an option to earn digital currency in your app. You must tell the user it's an advertising video before showing the ad and giving the reward.
You can either prompt the user with a pre-roll box for him to accept or customize a button that he spontaneously will click, being aware that he's going to watch an advertising video.
Rewarded video ads are not skippable after the user has accepted to watch them.

For Android only

It's necessary to add the Revmob activity in AndroidManifest.xml.Just add the following code in the application tag:

<application>
    <activity
            android:name="com.revmob.FullscreenActivity"
            android:configChanges="keyboardHidden|orientation" >
    </activity>
</application>
            

Sample Code

You have to call the CreateRewardedVideo method to pre-cache it before the ShowRewardedVideo. A good place to do that is as soon as the session is started, in the StartSession() callback.
Please note that the rewardedVideo object is a RevMobFullscreen object.
Make sure to call it only after Revmob's session is started. You can do that by checking if "revmob" object has been created or through Revmob's listeners.
In this example, the rewardedVideo object is created as soon as the session is started. This condition is verified once the SessionIsStarted() method is called by our SDK. Once the object is created, it will load an ad automatically.
The RewardedVideoVideoLoaded() listener method is called once the video is loaded. You can learn more about how to implement listeners here.
Despite being shown as soon as it is loaded in the example, the ad can be displayed at any time after the load is completed.

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameObject : MonoBehaviour, IRevMobListener {
    private static readonly Dictionary<String, String> REVMOB_APP_IDS = new Dictionary<String, String>() {
        { "Android", "<YOUR_APP_ID_ANDROID>"},
        { "IOS", "<YOUR_APP_ID_IOS>" }
    };
    private RevMob revmob;
    private RevMobFullscreen rewardedVideo;
    void Awake() {
        revmob = RevMob.Start(REVMOB_APP_IDS, "<YOUR_GAMEOBJECT_NAME>");
    }
    #region IRevMobListener implementation
    public void SessionIsStarted() {
        rewardedVideo = revmob.CreateRewardedVideo();
    }
    public void RewardedVideoLoaded() {
        if(rewardedVideo != null) rewardedVideo.ShowRewardedVideo();
    }
    public void RewardedVideoCompleted() {
        Debug.Log("RevMob Rewarded Video completed. You earned a coin!");
    }
    //You must also implement all the other listeners
    #endregion
}
            

User Reward

You can reward the user once this listener is fired:

public void RewardedVideoCompleted() {
    Debug.Log("RevMob Rewarded Video completed. You earned a coin!");
}
            

Rewarded videos are not skippable on the first time they're being watched. They can be skipped when replayed, though.

Listeners

Below are all Rewarded Video's specific listeners:
You can learn more about how to implement them here.

public void RewardedVideoLoaded() {
    Debug.Log(">>> RewardedVideoLoaded");
}
public void RewardedVideoNotCompletelyLoaded() {
    Debug.Log(">>> RewardedVideoNotCompletelyLoaded");
}
public void RewardedVideoStarted() {
    Debug.Log(">>> RewardedVideoStarted");
}
public void RewardedVideoFinished() {
    Debug.Log(">>> RewardedVideoFinished");
}
public void RewardedVideoCompleted() {
    Debug.Log(">>> RewardedVideoCompleted");
}
public void RewardedPreRollDisplayed() {
    Debug.Log(">>> RewardedPreRollDisplayed");
}
            
ant_smasher_video

Revmob's Video test ad

1 Event Listeners

With Listeners (also known as Delegates or Callbacks) you can follow the ad workflow. The Revmob SDK will fire events for every important change in the ad state.
For example, you can identify if the ad was loaded successfully or if the user clicked on the ad.
For a GameObject to receive event callbacks from Revmob, it must implement the interface IRevMobListener with all its methods:

public class GameObject : MonoBehaviour, IRevMobListener {
    private RevMob revmob;
    public void Awake() {
        revmob = RevMob.Start(REVMOB_APP_IDS, "Your_GameObject_name");
    }
    #region IRevMobListener implementation
    public void SessionIsStarted () {
        Debug.Log("Session started.");
    }
    public void SessionNotStarted (string revMobAdType) {
        Debug.Log("Session not started.");
    }
    public void AdDidReceive (string revMobAdType) {
        Debug.Log("Ad did receive.");
    }
    public void AdDidFail (string revMobAdType) {
        Debug.Log("Ad did fail.");
    }
    public void AdDisplayed (string revMobAdType) {
        Debug.Log("Ad displayed.");
    }
    public void UserClickedInTheAd (string revMobAdType) {
        Debug.Log("Ad clicked.");
    }
    public void UserClosedTheAd (string revMobAdType) {
        Debug.Log("Ad closed.");
    }
    public void RewardedVideoLoaded () {
        Debug.Log("RewardedVideoLoaded.");
    }
    public void RewardedVideoNotCompletelyLoaded () {
        Debug.Log("RewardedVideoNotCompletelyLoaded.");
    }
    public void RewardedVideoStarted () {
        Debug.Log("RewardedVideoStarted.");
    }
    public void RewardedVideoFinished () {
        Debug.Log("RewardedVideoFinished.");
    }
    public void RewardedVideoCompleted () {
        Debug.Log("RewardedVideoCompleted.");
    }
    public void RewardedPreRollDisplayed () {
        Debug.Log("RewardedPreRollDisplayed.");
    }
    public void VideoLoaded () {
        Debug.Log("VideoLoaded.");
    }
    public void VideoNotCompletelyLoaded () {
        Debug.Log("VideoNotCompletelyLoaded.");
    }
    public void VideoStarted () {
        Debug.Log("VideoStarted.");
    }
    public void VideoFinished () {
        Debug.Log("VideoFinished.");
    }
    #endregion
}
            

For JavaScript:

private var revmob:RevMob;
function SessionNotStarted(message) {
    Debug.Log("[RevMob Sample App - javascript] Session not started");
}
function AdDidReceive(adUnitType) {
    Debug.Log("[RevMob Sample App - JavaScript] Ad did received");
}
function AdDidFail(adUnitType) {
    Debug.Log("[RevMob Sample App - JavaScript] Ad did fail");
}
function AdDisplayed(adUnitType) {
    Debug.Log("[RevMob Sample App - JavaScript] Ad displayed");
}
function UserClickedInTheAd(adUnitType) {
    Debug.Log("[RevMob Sample App - JavaScript] Ad clicked");
}
function UserClosedTheAd(adUnitType) {
    Debug.Log("[RevMob Sample App - JavaScript] Ad closed");
}
function VideoLoaded(adUnitType) {
    Debug.Log("[RevMob Sample App - JavaScript] Video loaded");
}
function VideoStarted(adUnitType) {
    Debug.Log("[RevMob Sample App - JavaScript] Video started");
}
function VideoNotCompletelyLoaded(adUnitType) {
    Debug.Log("[RevMob Sample App - JavaScript] Video not completely loaded");
}
function VideoFinished(adUnitType) {
    Debug.Log("[RevMob Sample App - JavaScript] Video finished");
}
function RewardedVideoLoaded(adUnitType) {
    Debug.Log("[RevMob Sample App - JavaScript] Rewarded Video loaded");
}
function RewardedVideoStarted(adUnitType) {
    Debug.Log("[RevMob Sample App - JavaScript] Rewarded Video started");
}
function RewardedVideoNotCompletelyLoaded(adUnitType) {
    Debug.Log("[RevMob Sample App - JavaScript] Rewarded Video not completely loaded");
}
function RewardedVideoFinished(adUnitType) {
    Debug.Log("[RevMob Sample App - JavaScript] Rewarded Video finished");
}
function RewardedVideoCompleted(adUnitType) {
    Debug.Log("[RevMob Sample App - JavaScript] Rewarded Video completed");
}
function RewardedPreRollDisplayed(adUnitType) {
    Debug.Log("[RevMob Sample App - JavaScript] Rewarded pre roll displayed");
}
            

2 Placement IDs

Placement IDs are a way to control how ads perform in different parts of your app and select which of them will be running in real time, without any update to your code.
Take a look at your Apps page and click on your App to see its details. Scroll down and you'll find your default advertising placements (ad units). You can create new ones and name them properly (e.g. "Game Over").
To get its ID, click on the "gear" button on its row, and then in the "view" option, and find it right below its name on Placement Details page.

placements

You can then put as many ad units as you want throughout your app and control which ones are running, based on how each of them is performing. When you turn an ad unit "off", it simply won't receive any ads (you can test how ads behave when they don't receive ads turning testing mode on "without ads).
Do not forget to create Placement ID for both iOS and Android platforms (one for each App ID).

revmob.ShowFullscreen("<YOUR_PLACEMENT_ID>");
			

3 Timeout

You can change the connection timeout to the Revmob servers, if necessary. The default is 30s.

revmob.SetTimeoutInSeconds(5);
            

1 Change Log (yyyy/mm/dd)

9.2.1 (2016/09/08)

  • ImportantUpdate Improved Android banner pre caching

9.2.0 (2016/08/17)

  • ImportantBugfix Improved memory performance.
  • New Added Load and Release Banner.
  • Update Improved Video Ad UX.
  • Bugfix Fixed minor bugs.

9.1.0 (2016/05/12)

  • NewImportantBugfix Passed through new extensive Quality Assurance procedures.
  • Bugfix Fixed AdDidFail listener being fired on some click events on Android.

9.0.6 (2015/11/17)

  • New AdUnit Link has been improved and is now faster.
  • Bugfix Fixed issue that was causing Banners to not report impressions.
  • Update Internal improvements.

9.0.4 (2015/09/01)

  • New Added RevMob Button ad unit.
  • Bugfix Fixes an important issue affecting part of the clicks, lowering the eCPM.
  • Important Many internal improvements and performance enhances.

9.0.1 (2015/05/28)

  • Bugfix Updated Android and iOS binaries with fixes.

9.0.1 (2015/05/28)

  • Bugfix Updated Android and iOS binaries with fixes.

9.0.0 (2015/05/19)

  • New Added video ads, rewarded video ads and support to VAST.
  • New Refreshable banners.
  • Important Many internal improvements and performance enhances.

7.5.0 - 2015/04/07

  • Important Added x86_64 architecture support due to Apple's new requirement.
  • New Added refreshable banners.

7.4.2 - 2014/11/28

  • Important Fixes violations in the newest Google's Policy for advertising
  • Important Fixes issues that were causing the SDK to be flagged by some antivirus

7.4.1 - 2014/11/04

  • NewUpdate Support to iOS 8.1

7.4.0 - 2014/09/09

  • NewUpdate Support to iOS 8.0.1 (fullscreen now supports video ads)

7.3.2 - 2014/07/10

  • ImportantUpdate iOS Banner dimensions are not limited anymore. Logs inform if they are smaller than the expected.
  • ImportantUpdate Android Banner dimensions are not limited anymore.
  • ImportantBugfix iOS Banner was being shown in front of the keyboard.
  • NewImportant Support for Google ID for Advertisement (details)
  • NewImportant New listeners for Eula popup window (details) for Android.
  • NewImportant New public methods for accepting and rejecting the Eula programmatically - ONLY for testing purposes (details) for Android.

7.3.1 - 2014/05/15

  • ImportantBugfix Fixed an issue in iOS and Android that crashes app when calling ad in testing mode.

7.3.0 - 2014/05/14

  • NewImportant New listeners for start session in iOS and Android (documentation).
  • ImportantBugfix In iOS, status bar was being shown even if the app was hiding it.
  • ImportantUpdate Internal improvements.

7.2.7 - 2014/04/10

  • ImportantBugfix Fixes last remaining bugs on iOS that could lead to "SESSION NOT STARTED" warning.

7.2.6 - 2014/04/03

  • ImportantBugfix Fixes a bug on iOS that could lead to "SESSION NOT STARTED" warning.

7.2.5 - 2014/03/13

  • UpdateImportant Fixes a bug on iOS that was preventing some apps to be approved at AppStore.
  • Bugfix iOS fullscreen and banner were not preserving app supported orientations.
  • New Preload button for banner in Sample App.

7.2.4 - 2014/02/17

  • UpdateImportant Important internal improvements for iOS releases.

7.2.3 - 2014/02/14

  • UpdateImportant Important internal improvements for iOS releases.

7.2.2 - 2014/02/14

  • NewImportant Changed the plugin structure (new revmob folder).

7.2.1 - 2013/12/18

  • Bugfix iOS 7 banner crash.

7.2.0 - 2013/12/17

  • New Preload banner for Android.

7.1.2 - 2013/11/04

  • Bugfix Android banner crash when rotate the device.

7.1.1 - 2013/10/29

  • Bugfix Android banner position.

7.1.0 - 2013/10/24

  • update Banner for Android improved and with more options for position and resize.
  • Update Important internal improvements for Android releases.
  • Update Important internal improvements for iOS releases.

7.0.1 - 2013/09/26

  • New Sample App project added to the SDK.

7.0.0 - 2013/09/18

  • NewImportant Support to iOS 7 GM (arm64 architecture are not supported yet).
  • Important Dropped support to iOS 4.
  • Update Important internal improvements for Android releases.
  • Update Important internal improvements for iOS releases.

6.3.0 - 2013/08/27

  • New Fullscreen animations.
  • Delete Notification removed to respect the new Google policy.

6.2.5 - 2013/08/06

  • Bugfix iOS build issue.

6.2.4 - 2013/08/01

  • Update Important internal improvements for iOS releases.

6.2.3 - 2013/07/24

  • Update Important internal improvements for Android releases.
  • Update Important internal improvements for iOS releases.

6.2.2 - 2013/07/19

  • Bugfix Banner issue on iOS.

6.2.1 - 2013/07/18

  • New Banner for Android.
  • Update Important internal improvements for Android releases.

6.2.0 - 2013/05/23

  • Update Important internal improvements for Android releases.
  • Update Important internal improvements for iOS releases.
  • Optimization Using less memory in Android fullscreen.
  • Bugfix Banner in iOS can now be in the 0,0 position.

6.1.0 - 2013/04/10

  • Update- Important This version no longer send the UDID in iOS platform, according to the new Apple rules (More info).
  • Delete Method isLoaded was removed from all ad units for iOS and Android.

6.0.0 - 2013/02/27

  • New Internal improvements that implicates in better statistics management in the RevMob console.
  • Bugfix RevMobIosLink is now public.

5.0.2 - 2013/02/21

  • Update Important internal improvements for iOS releases.

5.0.1 - 2013/01/30

  • Update Important internal improvements for Android releases.

5.0.0 - 2013/01/21

  • New Custom timeout for Android and iOS.
  • New Notification ad for Android.
  • New Option to customize banner size and position for iOS.
  • New- Important New way to set the testing mode.
  • Update- Important Added RevMob prefix in all SDK objects. Banner renamed to RevMobBanner, Fullscreen renamed to RevMobFullscreen, Popup renamed to RevMobPopup. AdLink renamed to RevMobLink.
  • Bugfix Backing out printEnvironmentInformation method.

4.4.1 - 2012/11/09

  • New Changed Link to allow preload the ad.
  • New CreateAdLink method.

4.3.0 - 2012/10/19

  • New Support to armv6 for iOS builds.
  • New Added support to placements.

4.2.2 - 2012/10/05

  • Update Memory management improvement for iOS.
  • Bugfix Fixed callback names in android.
  • Bugfix Avoid app crash when gameObjectName is null.

4.2.0 - 2012/10/04

  • New Sends callback message to a GameObject.
  • New Open itunes in app (iOS).
  • New Supports armv7s.

4.1.1 - 2012/09/18

  • New Sending sdk name and version.

4.1.0 - 2012/09/14

  • New Added testing mode for iOS and Android.

4.0.1- 2012/08/27

  • Update Can be used in unity editor.

4.0.0 - 2012/08/24

  • New RevMobAndroid and RevMobIOS objects.
  • Update revmob-ios-sdk and revmob-android-sdk to the newest versions.

3.0.1 - 2012/08/09

  • New Method for print environment information: RevMob.PrintEnvironmentInformation(REVMOBAPPID).

3.0.0 - 2012/08/09

  • New Method startSession is now mandatory. There are significant chances in the facade (only the startSession method requires the Media ID).
  • New Now it is possible to use the RevMob SDK in Unity-JavaScript too.
  • New (iOS) feature to deactivate banner.
  • New (Android) Fullscreen is now an Activity.
  • New (Android) Open advertisements in Amazon App Store for Amazon Campaigns (not yet implemented in server).
  • OptimizationBugfix Using RevMob iOS SDK to version 3.0.0.
  • OptimizationBugfix Using RevMob Android SDK to version 3.5.0.

1.6.2 - 2012/07/19

  • Update iOS sdk to version 2.0.6
  • Update android sdk to version 3.2.6

1.6.1 - 2012/07/18

  • Update Android sdk to version 3.2.5.

1.6.0 - 2012/07/10

  • New Now it is possible to customize orientations for banner and fullscreen for iOS.
  • New Delegate methods for iOS.
  • New Fullscreen with pre-load for Android.

1.5.0 - 2012/07/03

  • New Added a Ad Link for iOS.
  • Update Fullscreen and banner for iOS now only rotates to orientation defined in the shouldAutorotateToInterfaceOrientation of the rootViewController.
  • Bugfix Fullscreen rotation for iOS is now working for iOS 4 too.

1.4.5 - 2012/07/02

  • Update Changed polish fullscreen translation.

1.4.4 - 2012/06/29

  • New Fullscreen with pre-load for iOS.
  • New Ad Link for Android.

1.4.3 - 2012/06/28

  • Update Better log messages for iOS.

1.4.2 - 2012/06/28

  • Update Internal improvements in the Fullscreen ad.

1.4.1 - 2012/06/27

  • Optimization Better iOS memory management.
  • Delete Fullscreen with pre-load for Android.

1.4.0 - 2012/06/25

  • New Banner advertisement for iOS.

1.3.2 - 2012/06/21

  • Update Renamed iOS headers to avoid conflicts.

1.3.1 - 2012/06/20

  • New Fullscreen for iOS has modal behavior.

1.3.0 - 2012/06/18

  • New Fullscreen without loading timefor iOS.
  • New Fullscreen without loading timefor Android.
  • Delete Fullscreen with pre-load for iOS.

1.2.0 - 2012/06/13

  • New Fullscreen with pre-load for iOS.

1.1.0 - 2012/06/09

  • New Fullscreen for iOS.

1.0.1 - 2012/06/07

  • New isAdLoaded method for fullscreen.
  • New Popup Ad for iOS and Android.
  • New Fullscreen Ad for Android.