This page will show you how to directly integrate Leadbolt Video and Interstitial ads in your Android app using Cocos2d-X. Download the SDK and sample app. Follow the instructions below and make sure you can compile the sample app and see test ads.

To get started sign up for a Leadbolt Publisher account here or login to the Publisher Portal here.


New You can now integrate Leadbolt Video and Interstitial ads in Cocos2d-X apps using SDKbox. To use SDKbox, follow the instructions, including download, provided by SDKbox here after Leadbolt Publisher signup.

Add your apps

Login to the Publisher Portal and select the ‘Create New App’ button from the “Apps” page. Fill in your app’s details including name and platform. Once app is added, it is recommended that you also apply for our premium deals by clicking “Direct Deals” in the Publisher Portal. Once approved, a “Direct Deals” section should be visible under your app in the Publisher Portal. Use the “Add Section” button if not visible.


Copy Your Integration Details

Your integration details will be displayed on the last page of the Create App process. These integration details will be needed when you integrate the Leadbolt SDK into your app.

Create App Dialogue-3

Integrating Leadbolt SDK

Unzip and copy the Leadbolt Android SDK and Cocos2d-X Plugin jar files ( AppTracker.jar  and AppTrackerCocos2dx.jar ) into your Android project via Eclipse (found in the folder of your Cocos2d-X App).

Copy the AppTrackerWrapper.h  and AppTrackerWrapperAndroid.cpp  files into your “Classes” folder of your Cocos2d-X App.

Open the folder in Eclipse and in your projects .java file (E.g. ), inside the onCreate()  method add the following line. Without this line, Leadbolt SDK may not work correctly:

In your project’s AndroidManifest.xml file, add the following required permissions:

Add the required Leadbolt Activity in your AndroidManifest.xml  file just before the </application> tag

Add the Ad serving code in your App’s .cpp file to implement Leadbolt Ads. This code uses the Auto recaching option to fetch a new Ad automatically – no additional coding required.

You will need to replace   "YOUR_APP_API_KEY"   with the specific api key for your app (include the double quotes). This is available in the settings menu for your app, under the option “Get App API Key”. To get Direct Deal Ads in your App, click on “Direct Deals” link in the Publisher Portal and click on the Apply button.

Passing additional information

You can increase your App’s performance by optionally including the additional information below. This allows selected premium advertisers to display their Ads to your users. To pass this additional information, use the following methods BEFORE calling loadModuleToCache


  • Video and Interstitial Ads may not be available at all times in all countries. It is always best to test with your App in Test Mode in the Publisher Portal to ensure as Test Ads are generally always available.
  • You should check your Publisher Portal and ensure the relevant section is visible under your App. Use the “Add Section” button to add if not available.
  • You should check the SDK logs located in Logcat logs with the Tag “AppTracker”.
  • Always test the sample app provided to confirm any integration issues are SDK based.
  • This plugin has been tested on the following versions of Cocos2d-X: v3.13.1


← Return to Help Center