You are here: Developers > OpenX Mobile Android SDK > Integrating the SDK with your project

Integrating the SDK with your project

Last updated on September 22, 2017

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 interstitial video 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" /> 

    Notes:

  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:

     				
    	<activity
    		android:name="com.openx.view.plugplay.views.browser.AdBrowserActivity"
    		android:configChanges="orientation|screenSize|keyboardHidden"
    		android:theme="@android:style/Theme.Translucent.NoTitleBar"
    		android:windowSoftInputMode="adjustPan|stateHidden"
    		android:launchMode="singleTop"/>
    	</activity>
    	  
  3. Add this tag to your <application> to use Google Play Services:
     
    	<meta-data android:name="com.google.android.gms.version" 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:

Feedback form