Initializing the SDK

Initialize the SDK once per app session, preferably at app launch.

The following table provides a list of parameter values to include when you initialize the DT FairBid SDK:

PARAMETER
TYPE
STATUS
DESCRIPTION

DT_App_ID

String

Required

DT assigns the DT App ID to all apps added to the DT ecosystem via the DT Console. For more information about adding an app, see Setting Up DT FairBid. To locate the DT App ID, log in to the DT Consolearrow-up-right, and go to Monetization→App Management. The Apps dashboard displays a list of your apps, and App IDs display below each app name.

user_id

String

Optional

The user_id is a unique identifier (256 characters or less) that allows you to differentiate individual app users. DT recommends setting a user_id, as it greatly assists with key functions such as server side rewarding for rewarded ads, counting unique users accurately, and user level reporting. Setting the user_id at SDK initialization is optional; however, you must specify it prior to requesting a rewarded ad.

To initialize the DT FairBid SDK, use the following code snippets to specify your DT_App_ID and optional user_id.

Kotlin
import com.fyber.FairBid
FairBid.start("DT_App_ID", activity)
// recommended
UserInfo.setUserId("user_id")
Java
import com.fyber.FairBid;
FairBid.start("DT_App_ID", activity);
// recommended
UserInfo.setUserId("user_id");

Last updated