Interstitial Ads
Making the Request
import com.fyber.fairbid.ads.Interstitial
val placementId = "12345"
Interstitial.request(placementId)import com.fyber.fairbid.ads.Interstitial;
String placementId = "12345";
Interstitial.request(placementId);FYBInterstitial.delegate = MyInterstitialDelegate()
let placementId = "1234"
FYBInterstitial.request(placementId)#import <FairBidSDK/FairBid.h>
FYBInterstitial.delegate = [[MyInterstitialDelegate alloc] init];
NSString *placementId = @"1234";
[FYBInterstitial request:placementId];string placementId = "1234";
Interstitial.Request(placementId);Adding Callbacks
Interstitial.setInterstitialListener(object : InterstitialListener {
override fun onShow(placementId: String, impressionData: ImpressionData) {
// Called when the interstitial from placement 'placementId' shows up.
// In case the ad is a video, audio play will start here.
}
override fun onClick(placementId: String) {
// Called when the interstitial from placement 'placementId' is clicked
}
override fun onHide(placementId: String) {
// Called when the interstitial from placement 'placementId' hides.
// In case the ad is a video, audio play will stop here.
}
override fun onShowFailure(placementId: String, impressionData: ImpressionData) {
// Called when an error arises when showing the interstitial from placement 'placementId'
}
override fun onAvailable(placementId: String) {
// Called when an interstitial from placement 'placementId' becomes available
}
override fun onUnavailable(placementId: String) {
// Called when an interstitial from placement 'placementId' becomes unavailable
}
override fun onRequestStart(placementId: String, requestId: String) {
// Called when an interstitial from placement 'placementId' is going to be requested
// 'requestId' identifies the request across the whole request/show flow
}
})Example Showing an Ad
Last updated
