Adapter Started Callback

Introduction

FairBid provides access to initialization information for integrated third-party SDK.

Two methods are available. The first informs that the initialization of the network SDK was successful, the second will inform of an error.

In both methods, the network name is an additional parameter. Checking the initialization status of the adapter and its network can be useful before performing an ad request for a given network.

Android

package com.fyber.fairbid.ads.mediation

interface MediationStartedListener {

/**
* Called when a mediation partner's network was successfully started
*
* @param network the {@link MediatedNetwork} that was started
*/
void onNetworkStarted(MediatedNetwork network)

/**
* Called when a mediation partner's network failed to start for any reason
*
* @param network the {@link MediatedNetwork} that was started
* @param errorMessage the reason of the fail
*/
void onNetworkFailedToStart(MediatedNetwork network, String errorMessage)

}

package com.fyber.fairbid.ads.mediation

public class
MediatedNetwork {

public String getName();

public String getVersion();
}

You can attach the MediationStartedListener listener before starting the SDK using the following code:

MediationStartedListener mediationStartedListener = new MediationStartedListener() {
@Override
public void onNetworkStarted(@NotNull MediatedNetwork network) {
// network started successfully
}

@Override
public void onNetworkFailedToStart(@NotNull MediatedNetwork network, @NotNull String errorMessage) {
// network failed to start with error
}
}

FairBid.configureForAppId("your_appid_goes_here")
.withMediationStartedListener(mediationStartedListener)
.start(activity)

 

Back to Top ⇧