ADITION Android Ad SDK Integration Guide for App Developers



Similar documents
AdFalcon Android SDK Developer's Guide. AdFalcon Mobile Ad Network Product of Noqoush Mobile Media Group

Mocean Android SDK Developer Guide

Developing an Android App. CSC207 Fall 2014

Android App Development. Rameel Sethi

By sending messages into a queue, we can time these messages to exit the cue and call specific functions.

ANDROID APP DEVELOPMENT: AN INTRODUCTION CSCI /19/14 HANNAH MILLER

PubMatic Android SDK. Developer Guide. For Android SDK Version 4.3.5

Android Development Tutorial. Human-Computer Interaction II (COMP 4020) Winter 2013

Developing Android Apps: Part 1

Presenting Android Development in the CS Curriculum

Advertiser Campaign SDK Your How-to Guide

Mobile Application Development

Create Your Own Android App Tools Using ArcGIS Runtime SDK for Android

Android Development. Marc Mc Loughlin

HERE SDK for Android. Developer's Guide. Online Version 2.1

How to develop your own app

Overview. About Interstitial Ads: About Banner Ads: About Offer-Wall Ads: ADAttract Account & ID

Getting Started With Android

MMI 2: Mobile Human- Computer Interaction Android

ID TECH UniMag Android SDK User Manual

Android Application Development. Yevheniy Dzezhyts

Chapter 2 Getting Started

Jordan Jozwiak November 13, 2011

Android For Java Developers. Marko Gargenta Marakana

Android Introduction. Hello Mihail L. Sichitiu 1

Android Programming Basics

Login with Amazon Getting Started Guide for Android. Version 2.0

Android Quiz App Tutorial

Android Development Tutorial

HERE SDK for Android. Developer's Guide. Hybrid Plus Version 2.1

Building Your First App

Android Tutorial. Larry Walters OOSE Fall 2011

Now that we have the Android SDK, Eclipse and Phones all ready to go we can jump into actual Android development.

Measuring The End-to-End Value Of Your App. Neil Rhodes: Tech Lead, Mobile Analytics Nick Mihailovski: Developer Programs Engineer

ADITION ios Ad SDK Integration Guide for App Developers

SDK Quick Start Guide

Arduino & Android. A How to on interfacing these two devices. Bryant Tram

Based on Android 4.0. by Lars Vogel. Version 9.8. Copyright 2009, 2010, 2011, 2012 Lars Vogel Home Tutorials Trainings Books Social

Tutorial: Android Object API Application Development. SAP Mobile Platform 2.3

Application Development

Saindo da zona de conforto resolvi aprender Android! by Daniel Baccin

Localization and Resources

Tutorial: Android Object API Application Development. Sybase Unwired Platform 2.2 SP02

Specialized Android APP Development Program with Java (SAADPJ) Duration 2 months

Tutorial #1. Android Application Development Advanced Hello World App

Università Degli Studi di Parma. Distributed Systems Group. Android Development. Lecture 2 Android Platform. Marco Picone

KomliMobile Android SDK

Android Concepts and Programming TUTORIAL 1

Android Application Development - Exam Sample

ITG Software Engineering

Sizmek Formats. HTML5 Page Skin. Build Guide

Android app development course

Android Application Development Lecture Notes INDEX

How To Write A File Station In Android.Com (For Free) On A Microsoft Macbook Or Ipad (For A Limited Time) On An Ubuntu 8.1 (For Ubuntu) On Your Computer Or Ipa (For

Understanding class paths in Java EE projects with Rational Application Developer Version 8.0

Woubshet Behutiye ANDROID ECG APPLICATION DEVELOPMENT

Basics. Bruce Crawford Global Solutions Manager

Chapter 9: Customize! Navigating with Tabs on a Tablet App

Android 多 核 心 嵌 入 式 多 媒 體 系 統 設 計 與 實 作

Android Programming. Høgskolen i Telemark Telemark University College. Cuong Nguyen,

Lab 1 (Reading Sensors & The Android API) Week 3

Introduction to Android Development

2. Installieren des MySQL Workbench (Version ) 3. Unter Database > Manage Connection folgende Werte eintragen

ELET4133: Embedded Systems. Topic 15 Sensors

Introduction to Android SDK Jordi Linares

Building an Android client. Rohit Nayak Talentica Software

Affdex SDK for Android. Developer Guide For SDK version 1.0

ADT Plugin for Eclipse

TUTORIALS AND QUIZ ANDROID APPLICATION SANDEEP REDDY PAKKER. B. Tech in Aurora's Engineering College, 2013 A REPORT

B.M. Harwani. Android Programming UNLEASHED. 800 East 96th Street, Indianapolis, Indiana USA

OpenCV on Android Platforms

How to Create an Android Application using Eclipse on Windows 7

Self Testing with MoPub SDK

ECWM511 MOBILE APPLICATION DEVELOPMENT Lecture 1: Introduction to Android

Developing In Eclipse, with ADT

Android Application Development: Hands- On. Dr. Jogesh K. Muppala

Centrify Mobile Authentication Services

Visual Basic Programming. An Introduction

Android Setup Phase 2

Backend as a Service

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)

Android Development. 吳 俊 興 國 立 高 雄 大 學 資 訊 工 程 學 系

Using Internet or Windows Explorer to Upload Your Site

How To Customize An Orgsync App On Anorus Mobile Security Suite On A Microsoft Ipad Oracle 2.5 (Ios) On A Pc Orca 2.2 (Iphone) On An Android Orca2 (Ip

Crystal Reports for Eclipse

Android Persistency: Files

Beginning Android Programming

Android Java Live and In Action

Report and Opinion 2014;6(7) Technical Specification for Creating Apps in Android. Kauser Hameed, Manal Elobaid

Android Programming. An Introduction. The Android Community and David Read. For the CDJDN April 21, 2011

J A D E T U TO R I A L

Transcription:

Documentation Version 0.5 ADITION Android Ad SDK Integration Guide for App Developers SDK Version 1 as of 2013 01 04 Copyright 2012 ADITION technologies AG. All rights reserved. 1/7

Table of Contents 1. Ad SDK Requirements 1.1 Requirements for Orientation Changes 2. Integrating the SDK in a Project 3. Displaying an Ad 3.1 Displaying an Inline Ad 3.1.1 Integration in XML 3.1.2 Programmatic Integration 3.1.3 Resize Ads in ScrollViews 3.2 Displaying an Interstitial 3.3 Defining a custom browser 3.4 Setting the viewable state of an ad 4. Demo Project Copyright 2012 ADITION technologies AG. All rights reserved. 2/7

1. Ad SDK Requirements Apps that make use of the SDK must be built for Android version 2.1 or later. In your Manifest you have to define the following permissions: <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_network_state" /> You also have to define the following Activity in your Manifest: <activity android:name="com.adition.android.sdk.aditionactivity"></activity> 1.1 Requirements for Orientation Changes To prevent the Ad from reloading while changing the devices orientation, the App Developer should handle orientation changes himself. To do so, the activities that show Ads, should be defined with the following parameters in the Manifest: android:configchanges="orientation keyboardhidden screensize" 2. Integrating the SDK in a Project In order to use the Adition SDK the App Developer has to copy the adition.jar file into the projects libs folder and add the library to its buildpath. If the libs folder does not exist, it needs to be created in the root of the project. 3. Displaying an Ad There are two options for displaying ads: inline: integrated in your layout interstitial: on top of the content (decoupled from layout) 3.1 Displaying an Inline Ad Copyright 2012 ADITION technologies AG. All rights reserved. 3/7

For displaying an Inline Ad you have to add an AditionView to your layout. This can be done in XML or programmatically in code. 3.1.1 Integration in XML <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/lib/com.adition.android.sdk" android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <com.adition.android.sdk.aditionview android:layout_width="wrap_content" android:layout_height="wrap_content" ads:content_unit_id="your_content_unit_id" ads:network_id="your_network_id" ads:max_width="400dp" ads:max_height="100dp" ads:keyword="your_kewords" ads:human_language="your_language" ads:tracking_group_name="your_tracking_group_name" > </com.adition.android.sdk.aditionview> </LinearLayout> 3.1.2 Programmatic Integration String networkid = "YOUR_NETWORK_ID"; String contentunitid = "YOUR_CONTENT_UNIT_ID"; Context context = YOUR_CONTEXT e.g. your Activity; boolean isinline = true; // your container layout LinearLayout l = (LinearLayout) findviewbyid(r.id.container); // programmatically creating AditionView AditionView aditionview = new AditionView(context, contentunitid, networkid, isinline); // optional parameters aditionview.setkeyword(keyword); aditionview.sethumanlanguage(your_language); aditionview.settrackinggroupname(tracking_group_name); Copyright 2012 ADITION technologies AG. All rights reserved. 4/7

// add the AditionView to layout l.addview(aditionview, LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT); // start loading content of ad aditionview.execute(); 3.1.3 Resize Ads in ScrollViews Resize Ads are non-modal overlays, so the user can still interact with the content of the App. To make them work in ScrollViews the App Developer has to use the provided AditionScollView which moves the AditionView according to the scroll movements. Layout XML: <com.adition.android.sdk.aditionscrollview xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/lib/com.adition.android.sdk" android:id="@+id/asv" android:layout_width="match_parent" android:layout_height="match_parent" > <LinearLayout android:id="@+id/container" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <!-- CONTENT GOES HERE e.g. <com.adition.android.sdk.aditionview> </com.adition.android.sdk.aditionview> --> </LinearLayout> </com.adition.android.sdk.aditionscrollview> Registering AditionView programmatically to AditionScrollView to track scroll movements. AditionScrollView asv = (AditionScrollView) findviewbyid(r.id.asv); asv.setaditionview(aditionview); 3.2 Displaying an Interstitial Copyright 2012 ADITION technologies AG. All rights reserved. 5/7

Interstitial Ads are displayed on top of the content. They are decoupled from the layout. So it is not possible to define them via XML; the app developer has to create them programmatically. String networkid = "YOUR_NETWORK_ID"; String contentunitid = "YOUR_CONTENT_UNIT_ID"; Context context = YOUR_CONTEXT e.g. your Activity; boolean isinline = false; // programmatically creating AditionView AditionView aditionview = new AditionView(context, contentunitid, networkid,, isinline); // optional parameters aditionview.setkeyword(keyword); aditionview.sethumanlanguage(your_language); aditionview.settrackinggroupname(tracking_group_name); // start loading content of ad aditionview.execute(); // show the interstitial aditionview.showinterstitial(); 3.3 Defining a custom browser The Adition SDK gives the App Developer the option to integrate a custom browser, which opens the clicked ads, e.g. for branding purposes. Custom browsers must implement the AditionBrowser interface and override openbrowserforad(string url) which decides what to do with the given url. By calling setbrowser(aditionbrowser browser)on the AditionView the custom browser is set. CustomBrowser cb = new CustomBrowser(aContext); aditionview.setbrowser(browser); 3.4 Setting the viewable state of an ad To notify the ad creative about the current visibility of the ad container the app developer has to call setviewable(boolean isviewable) on the AditionView instance when the visibility of the container changes (e.g. other content is on top of the ad container). Copyright 2012 ADITION technologies AG. All rights reserved. 6/7

4. Demo Project For demonstrating the minimum effort needed to display an ad, we have added a demo project. You can either copy the adition.apk directly to your Android Device or import the contents of the adition folder into an Eclipse workspace and run it from there on an emulator or a real device. The projects AdActivity class contains the relevant demo code to show the ads. Copyright 2012 ADITION technologies AG. All rights reserved. 7/7