RevMob Cordova SDK

Advertisement - Install Report

RevMob SDKs can be used by advertisers who want to report the installation of the advertised app. It only requires starting RevMob session.

Uploading App to AppStore

When uploading your app to AppStore with RevMob SDK, you will be asked about the use of IDFA.


RevMob uses IDFA for targeting purposes. You should check "Yes" on the option at the right side of the page, as it will improve a lot your earnings.

Then, on the last three checkboxes:


or through Cordova Plugins Website.

phonegap create HelloWorld && cd HelloWorld cordova plugin add Then copy the index.html file from the plugin's example folder to HelloWorld/www/

Creating a new PhoneGap project (Outdated info)

Start Session

Before showing any ads, you must start a RevMob session, i.e. initialize our 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.

  <meta charset="utf-8">
    <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
    <script type="text/javascript" charset="utf-8" src="revmob.js"></script>
    <script type="text/javascript" charset="utf-8">
        var revmob = null;
        function onDeviceReady() {
            revmob = new RevMob("copy your RevMob Media ID here");

        function onBodyLoad() {
            document.addEventListener("deviceready", onDeviceReady, false);
<body onLoad="onBodyLoad()">

Testing Mode

While you are developing your app, you will only receive test ads

Once you're finished, and your app is in the store with our SDK, you should register your media clicking in the Go Live! button in our Medias page


After clicking it, a pop up will appear. Paste the url for your app's store page.


Your app will be live and it will start to receive real ads.

Rewarded Video

Only supported by SDK version 9 or later.

Rewarded Videos are a great way to monetize interacting with your user. The most common way to display them is by showing a pre-roll text box inviting them to watch the ad and then a post-roll text box letting them know they earned the reward. We designed 7 amazing pre-roll and post-roll boxes for you to use. You can activate and personalize them through our console. If you don't want to use them, you can also use yours.

    this.loadRewardedVideo = function(successCallback, errorCallback) {
        cordova.exec(successCallback, errorCallback, "RevMobPlugin", "loadRewardedVideo", []);

    this.showRewardedVideo = function(successCallback, errorCallback) {
        cordova.exec(successCallback, errorCallback, "RevMobPlugin", "showRewardedVideo", []);


Only supported by SDK version 9 or later.

Video ads are top performers on both user satisfaction and monetization.

    this.loadVideo = function(successCallback, errorCallback) {
        cordova.exec(successCallback, errorCallback, "RevMobPlugin", "loadVideo", []);

this.showVideo = function(successCallback, errorCallback) {
        cordova.exec(successCallback, errorCallback, "RevMobPlugin", "showVideo", []);


Fullscreen is an advertising that occupies the whole screen of the device. It's usually shown:

    this.loadFullscreen = function(successCallback, errorCallback) {
        cordova.exec(successCallback, errorCallback, "RevMobPlugin", "loadFullscreen", []);

    this.showLoadedFullscreen = function(successCallback, errorCallback) {
        cordova.exec(successCallback, errorCallback, "RevMobPlugin", "showLoadedFullscreen", []);
    this.showFullscreen = function(successCallback, errorCallback) {
        cordova.exec(successCallback, errorCallback, "RevMobPlugin", "showFullscreen", []);


Only the banner basic usage is currently available.

revmob.showBanner(null, null);
revmob.hideBanner(null, null);


<button onclick="revmob.openButton(onSuccess, onError);">Open Button</button>

Native Link

It's really simple to use the Native Link. It's just an URL you receive that redirects the user to the advertised app download page.

A common usage is to associate it to a "more games" button or to a custom banner your team designed. Keep in mind that the image associated with this link must be clearly identified as an advertising.

revmob.openLink(null, null);

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.

var successCallback = function (event) {
    var message = "";
    if (event.RevMobAdsEvent == "SESSION_STARTED") {
        message = "Session started!";
    else if (event.RevMobAdsEvent == "AD_RECEIVED") {
        message = "Ad received!";
    else if (event.RevMobAdsEvent == "AD_DISMISSED") {
        message = "Ad dismissed!";
    else if (event.RevMobAdsEvent == "AD_CLICKED") {
        message = "Ad clicked!";
    else if (event.RevMobAdsEvent == "AD_DISPLAYED") {
        message = "Ad displayed!";
    else if (event.RevMobAdsEvent == "VIDEO_LOADED") {
        message = "Video loaded!";
    else if (event.RevMobAdsEvent == "VIDEO_NOT_COMPLETELY_LOADED") {
        message = "Video not completely loaded!";
    else if (event.RevMobAdsEvent == "VIDEO_STARTED") {
        message = "Video started!";
    else if (event.RevMobAdsEvent == "VIDEO_FINISHED") {
        message = "Video finished!";
    else if (event.RevMobAdsEvent == "REWARDED_VIDEO_LOADED") {
        message = "Rewarded Video loaded!";
    else if (event.RevMobAdsEvent == "REWARDED_VIDEO_NOT_COMPLETELY_LOADED") {
        message = "Rewarded Video not completely loaded!";
    else if (event.RevMobAdsEvent == "REWARDED_VIDEO_STARTED") {
        message = "Rewarded Video started!";
    else if (event.RevMobAdsEvent == "REWARDED_VIDEO_FINISHED") {
        message = "Rewarded Video finished!";
    else if (event.RevMobAdsEvent == "REWARDED_VIDEO_COMPLETED") {
        message = "Rewarded Video completed!";
    else if (event.RevMobAdsEvent == "REWARDED_PRE_ROLL_DISPLAYED") {
        message = "Rewarded Video Pre-Roll displayed!";
    else {
        message = event.RevMobAdsEvent;

var errorCallback = function (event) {
    var message = "";
    if (event.RevMobAdsEvent == "AD_NOT_RECEIVED") {
        message = "Ad not received!";
    else if (event.RevMobAdsEvent == "SESSION_NOT_STARTED") {
        message = "Session not started!";
    else {
        message = event.RevMobAdsEvent;

revmob.showFullscreen(successCallback, errorCallback);
revmob.openLink(successCallback, errorCallback);
revmob.showPopup(successCallback, errorCallback);


You can change the connection timeout to the RevMob servers, if necessary.



If you have any issues integrating RevMob SDK, take a look at our SDK Forum.

There you can find other developers' questions & answers that may help you out.

If your problem is a new one, in order to speed up the process, please attach on your post the console logs printed by the following command (it's a summary of your environment information).


Change Log (yyyy/mm/dd)

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.2 (2015/06/17)

  • Important Updated the SDK to follow Cordova's plugin structure

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.

1.4.2 - 2015/04/07

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

1.3.4 - 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

1.3.3 - 2014/11/05

  • NewImportantUpdate Added support to iOS 8.1
  • ImportantUpdate Internal improvements for both iOS and Android.

1.3.2 - 2014/09/10

  • NewImportantUpdate iOS Video Ads support.
  • NewImportant Android L compatibility.
  • NewImportant iOS 8 compatibility.

1.3.1 - 2014/07/10

  • ImportantUpdate iOS Banner dimensions are not limited anymore. Logs inform if they are smaller than the expected.
  • 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
  • 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.

1.3.0 - 2014/06/11

  • Update Internal improvements for Android releases.
  • Update Internal improvements for iOS releases.

1.2.2 - 2014/04/10

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

1.2.1 - 2014/02/19

  • Update Internal improvements for Android releases.
  • Update Internal improvements for iOS releases.

1.2.0 - 2013/11/13

  • New Banners are now available but with limited options.
  • Update Internal improvements for Android releases.
  • Update Internal improvements for iOS releases.

1.1.0 - 2013/10/04

  • New The listener returns what was the event (received, displayed, clicked, dismiss and not received).

1.0.0 - 2013/09/19

  • 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.

0.6.1 - 2013/09/11

  • Update Reduced sample app size.

0.6.0 - 2013/08/12

  • Update Cordova SDK 3.0.0.

0.5.2 - 2013/08/01

  • Update Important internal improvements for iOS releases.

0.5.1 - 2013/07/25

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

0.5.0 - 2013/05/29

  • Update Important internal improvements for Android releases.
  • Update Important internal improvements for iOS releases.
  • Optimization Using less memory in Android fullscreen.

0.4.1 - 2013/04/09

  • NewImportant iOS UDIDs are not collected anymore (More info).
  • Update Improvement on the logs.
  • Update Lots of internal improvements that will increase the eCPM significantly.
  • Update Android permissions validations (logs to alert implementation issues).
  • Bugfix Fixed an issue that can cause a click to fail on fullscreen.
  • Bugfix Fixed some issues that can prevent the notification of errors clicks.
  • Bugfix Fixed some issues that can cause memory leaks.

0.4.0 - 2013/02/27

  • New Using cordova 2.4.0.
  • New Ad Link for Android and iOS: revmob.openAdLink();
  • New Custom timeout for Android and iOS: revmob.setTimeoutInSeconds(5);
  • New Print Environment Informtion for Android and iOS: revmob.printEnvironmentInformation();
  • UpdateImportant New testing mode: revmob.setTestingMode(revmob.TEST_WITH_ADS); revmob.setTestingMode(revmob.TEST_WITHOUT_ADS);
  • Update Improvements in Android and iOS sample apps.

0.3.0 - 2012/11/30

  • New Using cordova 2.2.0.
  • Update RevMobPlugin210 class to keep compatibility with older versions of Cordova/PhoneGap.
  • Update Improvements in Android and iOS sample apps.

0.2.0 - 2012/11/19

  • Bugfix Avoid null pointer exception on create Fullscreen activity.
  • Bugfix Fixed error on click pop up.

0.1.5 - 2012/10/08

  • New Added sample android app.

0.1.5 - 2012/10/08

  • New Added support to iphone simulator.