Class POBAppOpenAd
-
- All Implemented Interfaces:
-
com.pubmatic.sdk.openwrap.core.POBBaseAd
@MainThread() public final class POBAppOpenAd implements POBBaseAd
Represents an App Open Ad.
Example usage:
// Create an instance of POBAppOpenAd val appOpenAd = POBAppOpenAd(context, publisherId, profileId, adUnitId) // Load an ad appOpenAd.loadAd() // To Show the Ad when ready. appOpenAd.showAd()- Since:
5.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classPOBAppOpenAd.POBAppOpenAdListenerThis is an interface for interaction with the POBAppOpenAd instance. All messages are guaranteed to occur on the main thread.
public interfacePOBAppOpenAd.POBVideoListenerInterface for interaction with the POBAppOpenAd instance for video events. These events will only be invoked for VAST based video creative. All methods are guaranteed to occur on the main thread.
-
Constructor Summary
Constructors Constructor Description POBAppOpenAd(Context context, String publisherId, Integer profileId, String adUnitId)Initializes and returns newly allocated app open ad object. POBAppOpenAd(Context context)Initializes and returns newly allocated app open ad object for supporting Bidding feature.
-
Method Summary
Modifier and Type Method Description final UnitshowAd()Presents an POBAppOpenAd ad in full screen view until the user dismisses it. final BooleanisReady()final UnitloadAd(String bidResponse, POBBiddingHost biddingHost)Initiates the loading of a AppOpenAd with oRTB bid response. UnitloadAd()final UnitsetListener(POBAppOpenAd.POBAppOpenAdListener listener)Sets instance of POBAppOpenAdListener to receive the ad event callbacks. final UnitsetVideoListener(POBAppOpenAd.POBVideoListener videoListener)Sets instance of POBVideoListener for getting callbacks of VAST based video ad. POBImpressiongetImpression()POBRequestgetAdRequest()Unitdestroy()UnitaddExtraInfo(String key, Object value)-
-
Constructor Detail
-
POBAppOpenAd
POBAppOpenAd(Context context, String publisherId, Integer profileId, String adUnitId)
Initializes and returns newly allocated app open ad object.- Parameters:
context- Activity/Application contextpublisherId- Identifier of the publisherprofileId- Profile ID of an ad tagadUnitId- Ad unit id used to identify unique placement on screen
-
POBAppOpenAd
POBAppOpenAd(Context context)
Initializes and returns newly allocated app open ad object for supporting Bidding feature.- Parameters:
context- Activity/Application context
-
-
Method Detail
-
showAd
@MainThread() final Unit showAd()
Presents an POBAppOpenAd ad in full screen view until the user dismisses it. Calling this method has no effect until the ad is received i.e. POBAppOpenAdListener.onAdReceived gets called. Recommended to check if isReady returns true before calling showAd.
-
isReady
final Boolean isReady()
- Returns:
true if the ad is ready to be displayed else returns false.
-
loadAd
@RequiresPermission(value = "android.permission.INTERNET")@MainThread() final Unit loadAd(String bidResponse, POBBiddingHost biddingHost)
Initiates the loading of a AppOpenAd with oRTB bid response. This API expects the response with oRTB v2.5 specification and bidding host.
- Parameters:
bidResponse- oRTB response of format - oRTB-2.5biddingHost- enum value representing the bidding server provider.
-
loadAd
@RequiresPermission(value = "android.permission.INTERNET")@MainThread() Unit loadAd()
-
setListener
final Unit setListener(POBAppOpenAd.POBAppOpenAdListener listener)
Sets instance of POBAppOpenAdListener to receive the ad event callbacks.
-
setVideoListener
final Unit setVideoListener(POBAppOpenAd.POBVideoListener videoListener)
Sets instance of POBVideoListener for getting callbacks of VAST based video ad.
- Parameters:
videoListener- Instance of POBVideoListener
-
getImpression
POBImpression getImpression()
-
getAdRequest
POBRequest getAdRequest()
-
destroy
@MainThread() Unit destroy()
-
addExtraInfo
Unit addExtraInfo(String key, Object value)
-
-
-
-