Update Guide

This guide describes steps required when updating from one Tapdaq SDK version to another, its recommended you perform all the steps to prevent any issues or conflicts.

Gradle upgrade

In your Build.gradle file, update the version of the Tapdaq SDK and any adapters. Then sync your project.

dependencies {
    implementation 'com.tapdaq.sdk:Tapdaq-BaseSDK:[VERSION]'
}

Manual upgrade

The following guide explains how to upgrade Tapdaq's Android SDK between each version.

1. Download the latest SDK

A .zip of our SDK from here

2. Replace Tapdaq.jar

Retrieve latest tapdaq.jar from the latest sdk package and simply replace the previous version in your libs folder. See further details on our Quickstart page.

3. Replace Ad Network SDK's

  • Some ad network sdk's are supplied as .jar files, you can simply grab the latest supported version from the sdk package and replace it in your libs folder.
  • Other networks use gradle dependencies, check the quickstart guide to find out which version is currently supported on our Quickstart page.

4. Replace Adapter.jars

Retrieve latest Adapter.jar's from the latest sdk package and simply replace the previous versions in your libs folder. See further details on our Quickstart page.

Upgrading Specific Versions

This section notes any changes that need to be made when upgrading to specific version.

7.1.0

Ironsource Instance ID's

The Ironsource Adapter has changed its implementation to use Instance IDs rather than Placements, both are available on the Ironsource dashboard and should be replaced in the Tapdaq dashboard.

Replacing ID's will cause previous SDK's to fail to load ads, vice versa leaving placements in the dashboard will cause new SDK's to fail to load.

Ironsource Offerwall Support Removed

Offerwalls will now fail to load as the Ironsource Offerwall implementation has been removed. The load/Show interface remains but will be removed in later versions.

Updated Ad Networks

  • AdColony Adapter has updated to support 3.3.8
  • Applovin Adapter has updated to support 9.4.2
  • Chartboost Adapter has updated to support 7.3.1
  • FAN Adapter has updated to support 5.1.1
  • InMobi Adapter has updated to support 7.2.7
  • Ironsource Adapter has updated to support 6.8.2
  • Tapjoy Adapter has updated to support 12.2.1
  • UnityAds Adapter has updated to support 3.0.1
  • Vungle Adapter has updated to support 6.3.24
  • YouAppi Adapter has updated to support 4.3.10

7.0.0

NEW: SDK version 7.0.0 supports zones. Please note, this release does not currently support cross promotion ad serving. To access our cross promotion features, please use SDK version 6.4.0

Registering Placement Tags

It's no longer required for placement tags to be registered with the TapdaqConfig object before initialising the SDK. Placement Tags are still used for Loading & Showing ads.

TapdaqConfig class remains, but the following methods have been REMOVED:

TapdaqConfig config = new TapdaqConfig();
config.registerPlacement();
config.getPlacementTags();
config.getRegisteredPlacements();
config.withCreativeTypesSupport();
config.withPlacementTagSupport();

Added DidFailToDisplay Callbacks

didFailToDisplay will be called after calling showAd (Interstitial, Video, Rewarded Video, Offerwall) if there is no ad to show, or the ad is unable to display. An error will be provided.

public interface TMAdListenerBase {
    void didFailToDisplay(TMAdError error);
}

AdMob Targeting

AdMob content rating will be forwarded for every ad request to AdMob, to do this, set the value in the config either before Tapdaq has initialised or after like so:

//Before Tapdaq initialises
TapdaqConfig config = new TapdaqConfig();
config.setAdMobContentRating("MA"); // G, PG, T, MA
config.setIsAgeRestrictedUser(true); // GDPR/COPPA flag

//After Tapdaq initialises
Tapdaq.getInstance().config().setAdMobContentRating("MA"); // G, PG, T, MA
Tapdaq.getInstance().config().setIsAgeRestrictedUser(true); // GDPR/COPPA flag

The tag_for_under_age_of_consent flag will be sent to AdMob if the user is subject to GDPR and AgeRestrictedUser is set. The ChildDirectedTreatment COPPA flag will be sent if user is not known to be subject to GDPR and AgeRestrictedUser is set. Read more about AdMob Targeting here.

Update Ad Networks

  • InMobi Adapter has updated to support 7.2.4
  • YouAppi Adapter has updated to support 4.3.8

6.4.0

Added Maven Support for Gradle Projects

The Tapdaq SDK & Adapter's can now be included in your project using a maven dependency, these will also automatically pull the network SDK's, so you are no longer required to add those dependencies unless you want to force a specific version.

Chartboost, Receptiv & UnityAds do not support gradle dependencies, so these Jars must still be added to your project manually.

In you APP_LEVEL Build.gradle file add the following:

    google()
    jcenter()

    //Tapdaq SDK & Adapters
    maven { url "http://android-sdk.tapdaq.com" }
}

dependencies {
    //Tapdaq
    implementation 'com.tapdaq.sdk:Tapdaq-BaseSDK:6.4.0'

    //Adapters - These will automatically pull ad network dependencies
    implementation 'com.tapdaq.sdk:TapdaqAdColonyAdapter:6.4.0'
    implementation 'com.tapdaq.sdk:TapdaqAdMobAdapter:6.4.0'
    implementation 'com.tapdaq.sdk:TapdaqAppLovinAdapter:6.4.0'
    implementation 'com.tapdaq.sdk:TapdaqChartboostAdapter:6.4.0'
    implementation 'com.tapdaq.sdk:TapdaqFANAdapter:6.4.0'
    implementation 'com.tapdaq.sdk:TapdaqInmobiAdapter:6.4.0'

    //Ironsource dependency requires explicit reference
    implementation('com.tapdaq.sdk:TapdaqIronsourceAdapter:6.4.0') {
        transitive false
    }

    implementation 'com.ironsource.sdk:mediationsdk:[email protected]'

    implementation 'com.tapdaq.sdk:TapdaqKiipAdapter:6.4.0'
    implementation 'com.tapdaq.sdk:TapdaqMoPubAdapter:6.4.0'
    implementation 'com.tapdaq.sdk:TapdaqReceptivAdapter:6.4.0'
    implementation 'com.tapdaq.sdk:TapdaqTapjoyAdapter:6.4.0'
    implementation 'com.tapdaq.sdk:TapdaqUnityAdsAdapter:6.4.0'
    implementation 'com.tapdaq.sdk:TapdaqVungleAdapter:6.4.0'
    implementation 'com.tapdaq.sdk:TapdaqYouAppiAdapter:6.4.0'
    implementation 'com.tapdaq.sdk:TapdaqZPlayAdapter:6.4.0'
}

Note the IronSource exception, to avoid an error pulling its dependencies, set it to transitive and add the IronSource SDK depdendency

Update Ad Networks

  • AdColony Adapter has updated to support 3.3.5
  • AppLovin Adapter has updated to support 8.1.4
  • Chartboost Adapter has updated to support 7.3.0
  • FAN Adapter has updated to support 5.0.1
  • Kiip Adapter has updated to support 3.0.1
  • InMobi Adapter has updated to support 7.2.1
  • MoPub Adapter has updated to support 5.4.0
  • Receptiv Adapter has updated to support 1.8.0.001
  • TapJoy Adapter has updated to support 12.1.0
  • UnityAds Adapter has updated to support 2.3.0
  • Vungle Adapter has updated to support 6.3.17
  • ZPlay Adapter has updated to support 2.1.1

Gradle supported networks

In your APP_LEVEL Build.gradle file update dependencies:

dependencies {
    implementation 'com.adcolony:sdk:3.3.5' //AdColony
    implementation 'com.applovin:applovin-sdk:8.1.4' //AppLovin
    implementation 'com.inmobi.monetization:inmobi-ads:7.2.1' //InMobi
    implementation 'me.kiip.sdk:kiip:3.0.1' //Kiip
    //MoPub
    implementation('com.mopub:mopub-sdk:[email protected]') {
        transitive = true
    }

    // For banners
    implementation('com.mopub:mopub-sdk-banner:[email protected]') {
        transitive = true
    }

    // For interstitials
    implementation('com.mopub:mopub-sdk-interstitial:[email protected]') {
        transitive = true
    }

    // For rewarded videos. This will automatically also include interstitials
    implementation('com.mopub:mopub-sdk-rewardedvideo:[email protected]') {
        transitive = true
    }
    //MoPub End

    implementation 'com.tapjoy:tapjoy-android-sdk:[email protected]' //TapJoy
    implementation 'com.github.vungle:vungle-android-sdk:6.3.17' //Vungle
    implementation ('com.playableads:playableads:2.1.1') //ZPlay
}

Jars

In the Networks/[NetworkName] folder with our sdk new jars are available for:

  • Chartboost
  • Receptiv
  • UnityAds

6.3.2

TapdaqConfig

Constructor no longer requires Context parameter

//New Constructor
TapdaqConfig config = new TapdaqConfig();

//Removed Constructor
TapdaqConfig config = new TapdaqConfig(context);

6.3.1

Update Ad Networks

FAN Adapter has updated to support 4.99.1.

Gradle supported networks

In your APP_LEVEL Build.gradle file update dependencies:

dependencies {
    implementation 'com.facebook.android:audience-network-sdk:4.99.1'
}

6.3.0

Update Ad Networks

FAN Adapter has updated to support 4.99.0.

Gradle supported networks

In your APP_LEVEL Build.gradle file update dependencies:

dependencies {
    implementation 'com.facebook.android:audience-network-sdk:4.99.0'
}

Mediated Native Ad Changes

DeprecatedMethods

TDMediatedNativeAd getIcon() method has been deprecated, replaced with getApppIconView which returns a View containing the icon, this object may be different type from each network.

//Deprecated getIcon
TDMediatedNativeAd ad;
if (ad.getIcon() != null) {
    TDMediatedNativeAdImage image = ad.getIcon();
    if (image.getDrawable() != null) {
        mIconimageView.setImageDrawable(image.getDrawable());
    } else if (image.getUrl() != null) {
        new TClient().executeImageGET(getContext(), image.getUrl(), 0, 0, new HttpClientBase.ResponseImageHandler() {
            @Override
            public void onSuccess(Bitmap response) {
                mIconimageView.setImageBitmap(response);
            }

            @Override
            public void onError(Exception e) {

            }
        });
    }
}


//Added getAppIconView
TDMediatedNativeAd ad;
if (ad.getAppIconView() != null) {
    mIconView.addView(ad.getAppIconView());
}

6.2.4

GDPR

Added UserSubjectToGDPR property, if this is not set to true then consent data will no longer be sent to ad networks. Where ad networks also request this field, we pass the value on.

STATUS can be TRUE, FALSE or UNKNOWN. By default it is UNKNOWN

NOTE: UserSubjectToGDPR must be set to TRUE before declaring if a user has provided consent. Where false, consent does not need to be sent

When initialising:

TapdaqConfig config = new TapdaqConfig(MainActivity.this);
config.setUserSubjectToGDPR(STATUS.TRUE);
config.setConsentGiven(true);
config.setIsAgeRestrictedUser(false);

After initialising:

Tapdaq.getInstance().setUserSubjectToGDPR(MainActivity.this, STATUS.TRUE);
Tapdaq.getInstance().setContentGiven(MainActivity.this, true);
Tapdaq.getInstance().setIsAgeRestrictedUser(MainActivity.this, true);

6.2.3

Update Ad Networks

TapJoy has recently supported maven, we now recommend using the gradle dependencies method and removing the .jar from your libs folder. If you must continue using the Jar, you should use 11.12.2 which can be obtained from their website with this release.

Gradle supported networks

In your APP_LEVEL Build.gradle file update dependencies:

repositories {
    maven {
        name "Tapjoy's maven repo"
        url "https://tapjoy.bintray.com/maven"
    }
}

dependencies {
    //AdColony
    implementation 'com.adcolony:sdk:3.3.4'
    
    //TapJoy
    implementation 'com.tapjoy:tapjoy-android-sdk:[email protected]'
}

6.2.2

GDPR

GDPR compliance has been added in this version, apps should acquire EU users consent for networks to provide personalised ads. Pass the consent to Tapdaq if consent is available at initialisation it should be added like so:

TapdaqConfig config = new TapdaqConfig(MainActivity.this);
config.setConsentGiven(true);
Tapdaq.getInstance().initialize(MainActivity.this, <APP_ID>, <CLIENT_KEY>, config, new TMInitListener());

If consent is acquired mid session inform Tapdaq like so:

Tapdaq.getInstance().setContentGiven(MainActivity.this, true);

NOTE: Chartboost will not update consent mid session and must be set at initialisation

Age restricted users

Some networks also ask if users are known to be under 16, this can also be set at initialisation or mid session like so:

TapdaqConfig config = new TapdaqConfig(MainActivity.this);
config.setIsAgeRestrictedUser(true);
Tapdaq.getInstance().initialize(MainActivity.this, <APP_ID>, <CLIENT_KEY>, config, new TMInitListener());

Set mid session like so:

Tapdaq.getInstance().setIsAgeRestrictedUser(MainActivity.this, false);

Update Ad Networks

Gradle supported networks

In your APP_LEVEL Build.gradle file update dependencies:

dependencies {
    //AdColony
    implementation 'com.adcolony:sdk:3.3.3'
    
    //AppLovin
    implementation 'com.applovin:applovin-sdk:8.0.1'
    
    //FAN
    implementation 'com.facebook.android:audience-network-sdk:4.28.1'
    
    //InMobi
    implementation 'com.inmobi.monetization:inmobi-ads:7.1.0'
    
    //IronSource
    implementation 'com.ironsource.sdk:mediationsdk:[email protected]'
    
    //Kiip
    implementation 'me.kiip.sdk:kiip:3.0.0'
    
    //Vungle
    implementation 'com.github.vungle:vungle-android-sdk:6.2.5'
    
    //YouAppi
    implementation "com.youappi.sdk:youappi-sdk-android-moat:4.1.1"
}

Jars

In the Adapter_Libs folder with our sdk new jars are available for:

  • Chartboost
  • UnityAds

6.2.0

Gradle 3.x

Sample apps and documentation now target Gradle 3.x, only noticable difference here is the dependencies keywords have changed:

dependencies {
    //Deprecated compile method
    compile 'com.google.android.gms:play-services-ads:15.0.0'
    
    //New implementation method
    implementation 'com.google.android.gms:play-services-ads:15.0.0'
}

Both can still be used in projects.

Play Services 15.x Dependency

The library Tapdaq (and our network partners) require to get the advertising id has changed:

dependencies {
    //Old dependency
    implementation 'com.google.android.gms:play-services-basement:11.8.0'
    
    //New dependency with play services 15.+
    implementation 'com.google.android.gms:play-services-ads-identifier:15.0.0'
    
    //Or the ads dependency will include it automatically (Required for AdMob anyway)
    implementation 'com.google.android.gms:play-services-ads:15.0.0'
}

NOTE: When using play services older than v15, basment or ads should still be used

6.1.0

AppLovin SDK Gradle dependency

We now recommend that the AppLovin sdk is added to your project using gradle, rather than as a jar (although jar's will still work).

1. Remove the applovin-sdk.jar from the libs folder.

2. Add AppLovin to the APP-LEVEL Build.gradle file in the dependencies

dependencies {
    ...
    compile 'com.applovin:applovin-sdk:7.8.5'
}

6.0.0

Override TMInitListener didFailToInitialise callback (Optional)

If Tapdaq fails to initialise due to invalid credentials, configuration, internet availability or anything else, didFailToInitialise will be called and Tapdaq will be have been initiated. An error message will provide details for not initialising.

public class TapdaqInitListener extends TMInitListener {
    public TapdaqInitListener() {

    }
    
    public void didInitialise() {
        super.didInitialise();
    }

    @Override
    public void didFailToInitialise(TMAdError error) {
        super.didFailToInitialise(error);
    }
}

5.10.0

Updating Ad Network SDK's

HyprMX and Vungle now provide SDK's via maven, we recommend reviewing our Quickstart page to with new Build.Gradle repositories and dependencies.

Proguard

Vungle Proguard settings have also changed as we've updated to Vungle SDK 5.3.2, review our Advanced page for details.

5.9.1

Deprecated/Replaced didVerify callback parameters

We've added a unique id value to each reward which will match that used in the server side callbacks, whilst doing so, we have consolidated all reward params into TDReward class.

TDReward.getCustom_json() returns Object which is dependent on the json structure entered via the dashboard, it will either be a Map or an ArrayList.

public class TMAdListener {
    @Deprecated
    @Override
    public void didVerify(String location, String reward, int value, boolean reward_valid, Map<Object, Object> custom_data) {

    }
    
    //Added new method
    public void didVerify(TDReward reward) {
        String id = reward.getId();
        String name = reward.getName();
        int value = reward.getValue();
        String tag = reward.getTag();
        Object custom_json = reward.getCustom_json();
    }
}

5.9.0

Lifecycle Methods

Receptiv requires Android lifecycle events to be passed back to their SDK. This may be used by Tapdaq, or by other adapters in the future. You can read more about lifecycle methods in our Quickstart Guide.

Tapdaq.getInstance().onPause & Tapdaq.getInstance().onResume must be called from all of your Activities** by overriding the onPause and onResume methods.

Here's an example:

@Override
protected void onPause() {
    super.onPause();
    Tapdaq.getInstance().onPause(this);
}

@Override
protected void onResume() {
    super.onResume();
    Tapdaq.getInstance().onResume(this);
}