Documentation

Support

Offerwall Migration Guide

Transition from ironSource to Tapjoy by following the Offerwall Migration Guide.
Read time 2 minutesLast updated 3 hours ago

  1. Integrate the Unity Offerwall adapter. You can add this to your project by using the ironSource mediation manager window.
  2. Add the Offerwall Unity Plugin. This will allow you to access Offerwall SDK methods from your C# code.
The Tapjoy Unity Plugin uses the External Dependency Manager to install a copy of the Offerwall iOS SDK and includes a copy of the Tapjoy Android SDK. As we already added the SDK by using the adapter in step 1, we do not want to include a second copy (we only want the bridging code). Modify the
TJPluginDependencies
file in /Assets/Tapjoy/Editor to remove the iOS references and only include the Android Unity Bridge. Replace the contents of the file with the following:
<dependencies>
<androidPackages>
    <repositories>
      <repository>https://sdk.tapjoy.com</repository>
    </repositories>
    <androidPackage spec="com.tapjoy:tapjoy-android-unitybridge:12.11.1@aar"/>
  </androidPackages>
</dependencies>
  1. Call Offerwall SDK functions directly. This is what we need to do to display the Tapjoy Offerwall. First, we need to import Tapjoy into your class:
import TapjoyUnity
  1. Initialise the Offerwall SDK. You will receive a callback when this succeeds (or fails) and you do not need to make any Offerwall SDK calls until you have received the success callback.
#if UNITY_ANDROID
  Tapjoy.Connect("your_android_sdk_key");
#elif UNITY_IOS
  Tapjoy.Connect("your_ios_sdk_key");
#endif
  1. Create a placement object and a listener (more on the listener in step 5). A placement is something you configure on the Offerwall dashboard and it will contain your Offerwall content card. In this example we are assuming you have named your placement Offerwall. In reality you can name it whatever you want but the name you use here in your code must match the dashboard.
TJPlacement placement = TJPlacement.CreatePlacement("Offerwall");
  1. Request your placement. With this call we are loading the placement so it is ready when you choose to display it. An Offerwall placement should load quickly, but it’s best call this in advance of when you think you will display the Offerwall.
placement.requestContent();
  1. We offer a range of callbacks that you can implement.
TJPlacement.OnRequestSuccess += HandlePlacementRequestSuccess;
TJPlacement.OnRequestFailure += HandlePlacementRequestFailure;
TJPlacement.OnContentReady += HandlePlacementContentReady;
TJPlacement.OnContentShow += HandlePlacementContentShow;
TJPlacement.OnContentDismiss += HandlePlacementContentDismiss;
Some of these can replace the ironSource callbacks you might have already implemented. You can see the corresponding callbacks in the table below so that you can easily move any custom logic into the appropriate Tapjoy callbacks:

ironSource Callback

Tapjoy Callback

onOfferwallClosedEventOnContentDismiss
onOfferwallOpenedEventOnContentShow
onOfferwallAvailableEventOnContentReady
OnRequestSuccess
will be called when the content request returns from Tapjoy’s servers.
OnContentReady
will be called when the content (Offerwall) is ready to display. At this point you can either display Offerwall, or set some flag so that you know it is ready to display when you need it.
  1. To display your Offerwall placement, check the content is ready, and then call
    showContent
    :
if (placement.IsContentReady()) {
  placement.ShowContent();
}
This will replace your existing ironSource call:
IronSource.Agent.showOfferwall();
  1. When the user has dismissed the Offerwall you must request the content again. You cannot show a placement multiple times. We would recommend that you request the placement in the
    OnContentDismiss
    callback so that it is ready to display again the next time a user requests it.
  2. You can now remove any remaining ironSource Offerwall code.

Privacy

If you are using Unity LevelPlay, you can use LevelPlay APIs to share with Tapjoy the following privacy flags:
  1. GDPR consent.
  2. Opt-out of sale or share of personal information under US state privacy laws.
  3. Flagging specific end users as children. Note that if your app is primarily directed to children under COPPA you must flag all end users as children.
Also, if your app participates in Google Play’s Designed for Families program, or appears in the “Family” section of Google Play, flag all the app's users as children and use this API of the Offerwall SDK so that we don't collect the user's GAID. If you are not using Unity LevelPlay or if you want to configure the Offerwall SDK separately, follow these guidelines to share with Tapjoy the relevant privacy flags.