Migration guide

This page will walk you through the migration process from a SDK version to another, starting from version 7.0.0.

We advise you to update your SDK version regularly to avoid having too much work to do during migration and to have access to new features and bug fixes.

  1. Migration from 7.11 to 7.13.0
    1. Huawei Advertising Id support
  2. Migration from 7.9 to 7.11
    1. API Annotation
    2. AdBreakEventListener deprecation
  3. Migration from 7.5 to 7.7
    1. Migration to AndroidX
    2. SVSContentData Builder

Migration from 7.11 to 7.13.0

Huawei Advertising Id support

The support of Huawei Advertising Id (for Huawei devices) is not included by default in the Smart Instream SDK anymore.
If you want to enable Advertising Id retrieval on such devices (which do not feature Google Avertising Id), you must explicitly declare the Huawei artifact repository and add the Smart Huawei support library dependency in your application's build.gradle file.
See Getting Started page for more information.

Migration from 7.9 to 7.11

API Annotation

A lot of APIs have been annotated with @NonNull and @Nullable annotations, both methods and interfaces.

It will only create warnings in case of JAVA application. But if you are using Kotlin, you will need to do some code adjustements as it will lead to warnings blocking the compilation.

AdBreakEventListener deprecation

The SVSAdManager.AdBreakEventListener have been deprecated as its name were too specific. Please use the SVSAdManager.AdManagerListener interface instead, it have the exact same behavior concerning the onAdBreakEvent() method.

In addition to this renaming, the SVSAdManager.AdManagerListener have a new API called onCuePointsGenerated() that will keep your inform once the SDK have generated all its cuepoints.

Migration from 7.5 to 7.7

Migration to AndroidX

The Smart Instream SDK is now compiled using AndroidX libraries, meaning they are needed at runtime and will be imported as transitive Gradle dependencies at building time.

It is mandatory from now on that any application importing the Smart Instream SDK be migrated to AndroidX (you will experience conflicts when building you application if you do not, or worse, crashes at runtime).

If you need assistance to migrate your application, here is the official Android migration guide.

SVSContentData Builder

The SVSContentData constructor is now deprecated and will be unavailable in a future release. We encourage you to create your SVSContentData instances using the new Builder instead.

By using the Builder instead of the initial constructor, you will be able setup only your needed parameters and ignore the others.

To do so, you will have to create an instance of SVSContentData.Builder then set your parameters by using its multiples setter methods. See yourself below:


// Instantiate the builder.
SVSContentData.Builder builder = new SVSContentData.Builder();

// Sets your parameters.
builder.setContentID("contentID");
builder.setContentTitle("contentTitle");
builder.setVideoContentType("videoContentType");
builder.setVideoContentCategory("videoContentCategory");
builder.setVideoContentDuration(60);
builder.setVideoSeasonNumber(1);
builder.setVideoEpisodeNumber(2);
builder.setVideoContentRating("videoContentRating");
builder.setContentProviderID("contentProviderID");
builder.setContentProviderName("contentProviderName");
builder.setVideoContentDistributorID("videoContainerDistributorID");
builder.setVideoContentDistributorName("videoContainerDistributerName");
builder.setVideoContentTags(new String[]{"tag1", "tag2"});
builder.setExternalContentID("externalContentID");
builder.setVideoCMSID("videoCMSID");

// Then build your instance of SVSContentData
SVSContentData contentData = builder.build();