Verizon Ads SDK Integration

Integration Prerequisites

The Verizon Ads SDK is available for both Android and iOS platforms. The following outlines the prerequisites for the development environment required to support each platform.

Android Prerequisites iOS Prerequisites
Android version 4.1 and up (API level 16+) iOS 8+
Android Build Tools 29 must be installed Xcode 10.1+
Gradle based build system  
Build environment with Java 8  

Before you can display ads within your app, you’ll need to login to your account on Verizon Media’s SSP and retrieve your Site ID, which is referenced in the integration guide below.

Configure Your Project

The Verizon Ads SDK is available via jCenter on Android and CocoaPods on iOS. Add the SDK to your project by adding the following lines to your app’s build.gradle or Podfile:

dependencies {
  implementation 'com.verizon.ads:android-vas-standard-edition:1.2.1'
  implementation 'com.google.android.gms:play-services-ads-identifier:16.0.0'
}
platform :ios, '8.0'

target 'MyApp' do
  use_frameworks!
  project "MyApp.xcproj"
  pod 'Verizon-Ads-StandardEdition', '1.2.1'
end

Android - Permissions

The Verizon Ads SDK requires the INTERNET permission and includes it in the SDK’s AndroidManifest.xml. As such, you do not need to explicitly add the INTERNET permission to your AndroidManifest.xml file. It is recommended, but not required, that the following permissions are explicitly added to your AndroidManifest.xml so that Verizon Media’s SSP can match your ad and bid requests to the most relevant demand:

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

Initializing the SDK

// Initialization should occur within the onCreate method of your Application subclass. Calling this method anywhere else is not supported

// Import the edition into your project
import com.verizon.ads.edition.StandardEdition;

// Initialize the SDK with your Site ID
StandardEdition.initialize(myApp, <YOUR_SITE_ID>);
// Initialization should occur within the onCreate method of your Application subclass. Calling this method anywhere else is not supported

// Import the edition into your project
import com.verizon.ads.edition.StandardEdition

// Initialize the SDK with your Site ID
StandardEdition.initialize(myApp, <YOUR_SITE_ID>)
// A best practice for initializing is in the app delegate’s application:didFinishLaunchingWithOptions: method

// Import the edition into your project
#import <VerizonAdsStandardEdition/VASStandardEdition.h>

// Initialize the edition with your Site ID
[VASStandardEdition initializeWithSiteId: <YOUR_SITE_ID>];
// A best practice for initializing is in the app delegate’s application(_:didFinishLaunchingWithOptions:) method

// Import the edition to be embedded in your app.
import VerizonAdsStandardEdition

// Initialize the edition with your site ID
VASStandardEdition.initialize(withSiteId:<YOUR_SITE_ID>)

Android - ProGuard

If using ProGuard to minify your app, include the following in your ProGuard config file:

-keepclassmembers class com.verizon.ads** {
public *;
}
-keep class com.verizon.ads**