Upgrading to Android SDK 3.3.3

The Vungle SDK 3.3.3 for Android introduces support for Android Marshmallow and a change in handling write permissions; refer to the change log for details. This document describes the necessary changes when upgrading.

Java 1.7

For compatibility with Android 5.+, the Vungle Android SDK now requires JDK7 to be installed on the development system.

Updating AndroidManifest.xml & Google Play Services
Unlike previous versions, Google Play Services is not required in this release. However, including Google Play Services with your project will allow Vungle to provide a more customized ad experience to the end-user. This therefore reduces the changes needed to be made to the Manifest.xml file to the following:

<manifest>

  ...

  <!-- permissions to download and cache video ads for playback -->
  <uses-permission android:name="android.permission.INTERNET" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <application> ... <!-- Required Activity for playback of Vungle video ads --> <activity android:name="com.vungle.publisher.FullScreenAdActivity" android:configChanges="keyboardHidden|orientation|screenSize" android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/> </application> </manifest>

*If your app does not need WRITE_EXTERNAL_STORAGE, then exclude the corresponding <uses-permission> from Android Manifest.

Support for Multiple EventListeners 

The publisher SDK now has the ability to support multiple EventListeners. To reflect this change the method has been changed from setEventListener() to setEventListeners(). Furthermore, the following methods have been added:

Method Description
 addEventListeners() Clears registered EventListeners and then adds the input eventListeners. 
 clearEventListeners() Clears EventListeners
 removeEventListeners() Removes the input EventListeners.

Renamed Methods

The following is a list of methods who have been renamed.

Old New
setEventListener() setEventListeners()
isCachedAdAvailable() isAdPlayable()
EventListener.onCachedAdAvailable() EventListener.onAdPlayableChanged()

 

Proguard Updates

Two new lines are needed in your Proguard configuration

  -keepattributes Signature
  -keep class dagger.* 
Have more questions? Submit a request

Comments