Offerwall

Offerwall gives users the choice to select their preferred ad experience in return for an in-app currency.

How to integrate?

Displaying an Offerwall should be handled directly with the Tapjoy SDK, Please see Tapjoy's Offerwall documentation on their website

When using Tapjoy's interstitial content through Tapdaq, the following steps should be taken:

1. Tapdaq Tapjoy Adapter

This is the TapdaqTapjoyAdapter.unitypackage

Import Adapter

Add it to your project but remove the following files from the import.

  • Plugins/Android/TapdaqTapjoy/assets
  • Plugins/Android/TapdaqTapjoy/libs/tapjoyconnectlibrary-12.3.0.jar
  • Plugins/Android/TapdaqTapjoy/res
  • Plugins/iOS/Tapdaq/NetworkSDKs/TapjoyAdapter

These files can also be removed after importing the adapter, simply delete them from their directories noted.

Edit Post Process Script

Open Assets/Plugins/Tapdaq/Editor/TapdaqBuildPostprocessor.cs and delete the following lines:

if (AssetDatabase.FindAssets("Tapjoy.framework").Length > 0) {
    if (!proj.ContainsFileByProjectPath("TapjoyResources.bundle")) { 
        var fullPath = FrameworksPath + FrameworksDir + "/Tapdaq/Network-SDKs/TapjoyAdapter/Tapjoy.framework/Resources/TapjoyResources.bundle"; 
        proj.AddFileToBuild (target, proj.AddFile (fullPath, "TapjoyResources.bundle", PBXSourceTree.Source)); 
    }
}

2. Tapjoy Unity Plugin

Download and import the plugin from the Tapjoy website

Tapjoy Unity Init script

Add the Tapjoy Unity Init script to a GameObject in your first scene. To do this, select your scene object, goto Add Component and select Scripts > TapjoyUnity.internal > Tapjoy Unity Init

Disable Auto-Connect

In the Unity Editor goto Window/Tapjoy and ensure Auto-Connect is unchecked.

3. Initialisation

Tapjoy Must be initialised before Tapdaq, do this like so:

In the Start method:

public void Start() {
    #if UNITY_IOS
    Tapjoy.Connect("YOUR_TAPJOY_IOS_KEY");
    #else
    Tapjoy.Connect("YOUR_TAPJOY_ANDROID_KEY");
    #endif
    Tapjoy.SetDebugEnabled(true);
}

Override OnEnable/OnDisable and implement callbacks:

private void OnEnable()
{
    Tapjoy.OnConnectSuccess += HandleConnectSuccess;
}

private void OnDisable()
{
    Tapjoy.OnConnectSuccess -= HandleConnectSuccess;
}

Listen for OnConnectSuccess callback by adding the following code:

private void HandleConnectSuccess()
{
    AdManager.Init();
}

4. Implement Content

Both Tapdaq & Tapjoy will now initialise successfull and are ready to use.

Tapdaq

Follow the Video and Rewarded-Video guides to show content.

Tapjoy

Use the Tapjoy documentation to display an offerwall

Using Tapjoy Managed Currency With Tapdaq

See Tapjoy Managed Currency docs

In order to manage currency across all networks & ad units, you will need to do the following to prevent rewarding users twice.

Within the Tapjoy dashboard, set the Rewarded Video reward values to zero to prevent extra reward being added. (Note that if you have a live app with these placements, you may want to create new placements in the Tapjoy dashboard for your new version to prevent any disruption for existing users)

Within your code listen for Tapdaq Reward Callbacks & add values to the Tapjoy currency account like so:

@Override
private void OnRewardVideoValidated(TDVideoReward videoReward)
{
    if (videoReward.RewardValid)
    {
        Tapjoy.AwardCurrency(videoReward.RewardAmount);
    }
}

You should reward users from rewarded video’s via the Tapdaq didVerify callback.

Need help?

If you are having any problems integrating, feel free to contact us on [email protected] and we will be more than happy to help.

What's next?

Now that you have successfully integrated an offerwall into your app, what would you like to do next?