/
Android SDK - Implementation

Android SDK - Implementation

IMPORTANT!

In order to use the SDK the account must have the Rich Media service enabled.

If this is not the case and you need assistance, get in touch with your Account Executive or our Commercial team directly.

 

Introduction

This document describes the required steps for the integration of e-planning’s Android SDK.

By using such SDK, you will be able to easily serve traditional, Rich Media MRAID compliant, interstitial and third party tag ads that come from different sources.

e-planning’s Android SDK supports the targeting functionalities provided for the delivery of e-planning ad server ads.

 

Implementation

Implementation of advertising spaces in apps implies three steps:

  1. Creation of placements in the ad server tool.
  2. Creation of a test campaign and ads.
  3. SDK implementation in the app.

 

1. CREATION OF PLACEMENTS

In e-planning’s ad server platform, it is necessary to create a site that corresponds to the app, and at least a zone and a space for each placement (advertising spaces) that you would like to implement inside that app.

For instance, if you would like to implement two zones, “Home” and “Internal”, each zone with two 320x50 advertising spaces (top and bottom) and an interstitial ad, you must create 6 different spaces (placements) in e-planning.

 

 

To create the site, zones and spaces, access the Inventory tab in the ad server.

 

 

To Create a Site >> go to “Add Site”.

IMPORTANT!

When creating the site, indicate under 'Implementation type' that it belongs to an APP, otherwise the related options for SDK won´t be available:

If the site is already created, edit it and select the correct option: APP


To create a zone >> go to “Add Zone”.

To create a space >> go to “Add Space”.

 

 

Once the site, zones and spaces have been created, extract the platform ID and placement IDs, and download the SDK package.

 

To do it, please enter the “Sites” option inside the “Inventory” tab. Select the site which corresponds to your App, and then, click on the “Mobile SDK” option:

 

There you will find e-planning’s Android SDK download links, and the test application code. On that screen, you will also be able to view the parameters to be configured inside the SDK.

 

Configuration Parameters:

 

  1. Platform ID

The system will indicate a two-letter alphabetic code: AR, US or EU. Such code must be included in the Settings.java file, as it will be indicated below.

 

  1. Placement IDs

The system will identify each of the created spaces with a different alphanumeric code. Those IDs will be included in the requests made for advertising spaces inside the app, in accordance with the instructions set forth in this document.

 

 

2. HOW TO CREATE A TEST CAMPAIGN AND ADS

In order to facilitate the implementation and testing process, we suggest you to create a test campaign and ads in the placements that were previously created. Please remember that you must implement image type ads (JPEG, PNG or GIF).

This process can be carried out in e-planning’s platform by accessing the “Orders” tab and then clicking on “Campaigns”.

 

3 . SDK IMPLEMENTATION

 

How to Import the SDK

Before initiating the most advanced steps of the SDK configuration, you must import all of its content to the workspace that contains the app where you would like to implement e-planning’s SDK.

Then, you should create the reference between projects so that the app can access the SDK objects.

 

Platform ID Configuration

In the 'sdk/src/com/appnexus/opensdk/utils/Settings.java' file, you will need to indicate the code obtained in the previous step, in the BASE_URL variable, at the end of the EPL_PLATAFORM_XX string:

 

 /** 

 * Here you have to change to other platform to get the required ad******************************************* 

 */

 private final String EPL_PLATFORM_US = 'us';

 private final String EPL_PLATFORM_AR = '';

 private final String EPL_PLATFORM_EU = 'eu';

 public /*final*/ String BASE_URL = 'http://ads.' + EPL_PLATFORM_US + '.e-planning.net/mob?&';

 

 //************************************************************************************************************

* Sample Gist: https://gist.github.com/emaraschio/47f44cfd2be13ccf41fa

 

 

Implementation in Apps

 

Add the following activities and permissions to the App’s Manifest:

 

<uses-permission android:name='android.permission.WRITE_EXTERNAL_STORAGE'/>

<uses-permission android:name='android.permission.ACCESS_NETWORK_STATE'/>

<uses-permission android:name='android.permission.ACCESS_WIFI_STATE'/>

<uses-permission android:name='android.permission.INTERNET'/>

<uses-permission android:name='android.permission.ACCESS_FINE_LOCATION'/>

<uses-permission android:name='android.permission.ACCESS_COARSE_LOCATION'/>

<uses-permission android:name='android.permission.READ_PHONE_STATE'/>

 

<activity android:name='com.appnexus.opensdk.AdActivity'/>

<activity android:name='com.appnexus.opensdk.BrowserActivity'/>


* Sample Gist and Manifest: https://gist.github.com/emaraschio/0eda4aaf8a6869a94cc8

Related content