DT FairBid provides access to initialization information about FairBid itself and each of the integrated third-party SDKs. Run the following API to set up a single listener that monitors mediation events, confirms network readiness, and efficiently handles initialization in your app.
For more details on each individual third-party SDK, see Supported Networks.
fairBid.withFairBidListener(object : FairBidListener {
override fun mediationFailedToStart(errorMessage: String, errorCode: Int) {
// The SDK was unable to start any of the mediated networks.
// That includes DT-X
// Nothing to do. Contact support if this error persists (errorCode will be used to troubleshoot the problem)
}
override fun mediationStarted() {
// FairBid is ready to mediate.
// TPNs that need to be started as early as possible have been started
}
override fun onNetworkFailedToStart(network: MediatedNetwork, errorMessage: String) {
// A specific network failed to start.
}
override fun onNetworkStarted(network: MediatedNetwork) {
// A specific network started successfully.
}
})
Java
FairBid.configureForAppId("AppId").withFairBidListener(new FairBidListener() {
@Override
public void mediationFailedToStart(String errorMessage, int errorCode) {
// The SDK was unable to start any of the mediated networks.
// That includes DT-X
// Nothing to do. Contact support if this error persists (errorCode will be used to troubleshoot the problem)
}
@Override
public void mediationStarted() {
// FairBid is ready to mediate.
// TPNs that need to be started as early as possible have been started
}
@Override
public void onNetworkFailedToStart(MediatedNetwork network, String errorMessage) {
// A specific network failed to start.
}
@Override
public void onNetworkStarted(MediatedNetwork network) {
// A specific network started successfully.
}
});
}
class MyDelegate: FairBidDelegate {
func networkStarted(_ network: FYBMediatedNetwork) {
// A specific network started successfully.
}
func network(_ network: FYBMediatedNetwork, failedToStartWithError error: Error) {
// A specific network failed to start.
}
func mediationStarted() {
// FairBid is ready to mediate.
// TPNs that need to be started as early as possible have been started
}
func mediationFailedToStartWithError(_ error: Error) {
// The SDK was unable to start any of the mediated networks.
// That includes DT-X
// Nothing to do.
// Contact support if this error persists (errorCode will be used to troubleshoot the problem)
}
}
}
Objective-C
@interface MyDelegate: NSObject
@end
@implementation MyDelegate
- (void)networkStarted:(FYBMediatedNetwork)network {
// A specific network started successfully.
}
- (void)network:(FYBMediatedNetwork)network failedToStartWithError:(NSError *)error {
// A specific network failed to start.
}
- (void)mediationStarted {
// FairBid is ready to mediate.
// TPNs that need to be started as early as possible have been started
}
- (void)mediationFailedToStartWithError:(NSError *)error {
// The SDK was unable to start any of the mediated networks.
// That includes DT-X
// Nothing to do.
// Contact support if this error persists (errorCode will be used to troubleshoot the problem)
}
@end
public class MyListener : FairBidListener
{
public void OnNetworkStarted(MediatedNetwork network)
{
// A specific network started successfully.
}
public void OnNetworkFailedToStart(MediatedNetwork network, string error)
{
// A specific network failed to start.
}
public void OnMediationStarted()
{
// FairBid is ready to mediate.
// TPNs that need to be started as early as possible have been started
}
public void OnMediationFailedToStart(string error, string code)
{
// The SDK was unable to start any of the mediated networks.
// That includes DT-X
// Nothing to do.
// Contact support if this error persists (errorCode will be used to troubleshoot the problem)
}
}
FairBid.SetFairBidListener(new MyListener());
Supported Networks
A MediatedNetwork is essentially a pair containing the network name and its version. If you want to track a particular network, refer to the following table:
NETWORK MARKETING NAME | NAME USED IN CALLBACK | LAZY START* | CONTAINS START SUCCESS CALLBACK** |
---|---|---|---|
AdMob/Google Bidding | ADMOB |
|
|
Amazon Publisher Services | AMAZON |
|
|
Applovin | APPLOVIN |
|
|
BIGO Ads | BIGOADS |
|
|
Chartboost | CHARTBOOST |
|
|
Google Ad Manager | GAM |
|
|
HyprMX | HYPRMX |
|
|
InMobi | INMOBI |
|
|
IronSource | IRON_SOURCE |
|
|
Meta Audience Network |
|
|
|
Mintegral | MINTEGRAL |
|
|
MyTarget | MYTARGET |
|
|
Ogury | OGURY |
|
|
Pangle | PANGLE |
|
|
Unity Ads | UNITYADS |
|
|
Verve Group | VERVE |
|
|
Liftoff Monetize | VUNGLE |
|
|
- Lazy Start: FairBid only starts this TPN when asked to get an ad for the 1st time (instead of when FairBid itself is starting)
- Contains Start Success Callback: This network has an explicit callback reporting whether the start was successful.
NETWORK MARKETING NAME | NAME USED IN CALLBACK | LAZY START* | CONTAINS START SUCCESS CALLBACK** |
---|---|---|---|
AdMob/Google Bidding | ADMOB |
|
|
Amazon Publisher Services | AMAZON |
|
|
Applovin | APPLOVIN |
|
|
BIGO Ads | BIGOADS |
|
|
Chartboost | CHARTBOOST |
|
|
Google Ad Manager | GAM |
|
|
HyprMX | HYPRMX |
|
|
InMobi | INMOBI |
|
|
IronSource | IRON_SOURCE |
|
|
Meta Audience Network |
|
|
|
Mintegral | MINTEGRAL |
|
|
MyTarget | MYTARGET |
|
|
Ogury | OGURY |
|
|
Pangle | PANGLE |
|
|
Unity Ads | UNITYADS |
|
|
Verve Group | VERVE |
|
|
Liftoff Monetize | VUNGLE |
|
|
- Lazy Start: FairBid only starts this TPN when asked to get an ad for the 1st time (instead of when FairBid itself is starting)
- Contains Start Success Callback: This network has an explicit callback reporting whether the start was successful.
Note
Lazy Start on iOS should work for every network, but we start a network immediately if we have at least one programmatic instance for the network.
For Android
NETWORK MARKETING NAME | NAME USED IN CALLBACK | LAZY START* | CONTAINS START SUCCESS CALLBACK** |
---|---|---|---|
AdMob/Google Bidding | ADMOB |
|
|
Amazon Publisher Services | AMAZON |
|
|
Applovin | APPLOVIN |
|
|
BIGO Ads | BIGOADS |
|
|
Chartboost | CHARTBOOST |
|
|
Google Ad Manager | GAM |
|
|
HyprMX | HYPRMX |
|
|
InMobi | INMOBI |
|
|
IronSource | IRON_SOURCE |
|
|
Meta Audience Network |
|
|
|
Mintegral | MINTEGRAL |
|
|
MyTarget | MYTARGET |
|
|
Ogury | OGURY |
|
|
Pangle | PANGLE |
|
|
Unity Ads | UNITYADS |
|
|
Verve Group | VERVE |
|
|
Liftoff Monetize | VUNGLE |
|
|
For iOS
NETWORK MARKETING NAME | NAME USED IN CALLBACK | LAZY START* | CONTAINS START SUCCESS CALLBACK** |
---|---|---|---|
AdMob/Google Bidding | ADMOB |
|
|
Amazon Publisher Services | AMAZON |
|
|
Applovin | APPLOVIN |
|
|
BIGO Ads | BIGOADS |
|
|
Chartboost | CHARTBOOST |
|
|
Google Ad Manager | GAM |
|
|
HyprMX | HYPRMX |
|
|
InMobi | INMOBI |
|
|
IronSource | IRON_SOURCE |
|
|
Meta Audience Network |
|
|
|
Mintegral | MINTEGRAL |
|
|
MyTarget | MYTARGET |
|
|
Ogury | OGURY |
|
|
Pangle | PANGLE |
|
|
Unity Ads | UNITYADS |
|
|
Verve Group | VERVE |
|
|
Liftoff Monetize | VUNGLE |
|
|
- Lazy Start: FairBid only starts this TPN when asked to get an ad for the 1st time (instead of when FairBid itself is starting)
- Contains Start Success Callback: This network has an explicit callback reporting whether the start was successful.