Integrating the SDK with your project

Last updated on January 29, 2018

The OpenX Mobile Android SDK provides integration scenarios for bannerThis is an ad that appears on a web page which is typically hyperlinked to an advertiser’s website. Banners can be images (GIF, JPEG, PNG), JavaScript programs or multimedia objects (For example, Java)., interstitialA full-screen ad displayed in content transitions. For example, a video ad that loads between levels of a mobile game., and video interstitial ads. Before you start, you need to update your Android manifest.

Updating your Android manifest

  1. In order to complete the SDK integration, your AndroidManifest.xml will need to be updated. Add the following permissions and activity declarations according to the bundle you are integrating.

    	<uses-permission android:name="android.permission.INTERNET" />
    	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    	<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    	<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    	<uses-permission android:name="android.permission.READ_PHONE_STATE" />
    	<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> 


  2. For banner and interstitial ads, include the following custom activities (even though you won’t instantiate them directly). This is not necessary for video interstitial ads.

    Custom Activities:

  3. Add this tag to your <application> to use Google Play Services:
    	<meta-data android:name="" android:value="@integer/google_play_services_version" />  

Now you are ready to continue with specific integration steps for each ad type. See the following pages for details: