Update guide from SDK 3.x.x to SDK 4.x.x

Vungle Android SDK version 4.x.x supports Android Nougat (API 7.0) with multi-window mode and enhanced video ad experience. The following changes are required when updating from SDK v3.x.x to v4.x.x.


1. Update Event Listener


public void onAdEnd(boolean wasCallToActionClicked) {} - 3.x.x


public void onAdEnd(boolean wasSuccessfulView, boolean wasCallToActionClicked) {} - 4.x.x

2. Replace FullScreenAdActivity in AndroidManifest.xml

Please note that we no longer have the activity FullScreenAdActivity. Replace FullScreenAdActivity activity in your AndroidManifest.xml to the following activity:

<activity android:name="com.vungle.publisher.VideoFullScreenAdActivity"

3. Add MraidFullScreenAdActivity in AndroidManifest.xml 

We introduced a new Android activity in our SDK. Add MraidFullScreenAdActivity in AndroidManifest.xml:

<activity android:name="com.vungle.publisher.MraidFullScreenAdActivity"

4. Update permissions in AndroidManifest.xml

Permission for WRITE_EXTERNAL_STORAGE is not required for API 19 and above. (Refer to: https://developer.android.com/guide/topics/manifest/uses-permission-element.html.)

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

5. Update Dagger Library

With our new SDK, we have introduced some features that are used in Dagger 2.7. We have included this version of Dagger with our SDK. If you have an old Dagger version, we strongly recommend upgrading to the new Dagger. If you are still using Dagger 1, and were using a modified Dagger 2 for Vungle Android SDK 3.3.5 and above, then you will need to modify the Dagger that comes with our new SDK to remove all the classes shared by Dagger 1. You can then include both Dagger versions with no issues.

6. Deprecated Listener

Please note that starting with the Vungle Android SDK version 4.0.2, the following listener has been deprecated and will be removed at some point:

public void onVideoView(boolean isCompletedView, int watchedMillis, int videoDurationMillis))

We recommend that you remove this listener, and instead use:

public void onAdEnd(boolean wasSuccessfulView, boolean wasCallToActionClicked) {} 


Have more questions? Submit a request