Triton Mobile SDK for Android 3.5.1 This is a custom android player made by Triton Digital

Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
com.tritondigital.ads.Interstitial Class Reference

Displays a full-screen Triton ad. More...

## Classes
interface | InterstitialListener
| A listener for receiving Interstitial notifications. More...

## Public Member Functions
| Interstitial (Context context)
| Constructor.
void | release ()
| Destroys the Interstitial.
void | setListener (InterstitialListener listener)
| Sets the interstitial listener.
void | setEnableCountDownDisplay (boolean mEnableCountDownDisplay)
InterstitialListener | getListener ()
| Returns the interstitial listener.
void | showAd (AdRequestBuilder adRequestBuilder, Map< String, List< Integer > > dmpSegments)
| Shows an ad from an ad request.
void | showAd (AdRequestBuilder adRequestBuilder)
| Shows an ad from an ad request.
void | showAd (String adRequest)
| Shows an ad from an ad request.
void | showAd (Bundle ad)
| Shows an ad.

## Static Public Member Functions
static String | debugErrorToStr (int errorCode)
| Converts the error codes to a string.

## Static Public Attributes
static final int | ERROR_UNKNOWN = AdLoader.ERROR_UNKNOWN
static final int | ERROR_NO_INVENTORY = AdLoader.ERROR_NO_INVENTORY
static final int | ERROR_UNKNOWN_HOST = AdLoader.ERROR_UNKNOWN_HOST
static final int | ERROR_NETWORK_NOT_AVAILABLE = AdLoader.ERROR_NETWORK_NOT_AVAILABLE
static final int | ERROR_INVALID_MEDIA_URL = 8005
| Invalid media URL.
static final int | ERROR_LOAD_AFTER_RELEASE = 8006
| Trying to load an ad after release()
static final int | ERROR_LOADING_IN_PROGRESS = 8007
| An ad loading is already in progress.
static final int | ERROR_MEDIA_PLAYER_ERROR = 8008
| Error while try to play the audio or video ad.
static final int | ERROR_UNSUPPORTED_MIME_TYPE = 8009
| MIME type not starting with "audio" or "video".

## Detailed Description

Displays a full-screen Triton ad.

Interstitials are full screen UI that can play audios and videos ads. Usually, an interstitial audio ad comes with a banner. It is recommended to preload intersitials so they can be shown quickly. when needed.

AndroidManifest.xml
  Applications using interstitial ads must include the following code in their manifest.
  <activity
  android:name="com.tritondigital.ads.InterstitialActivity"
  android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />

Skip
  We can't force an Android activities to stay on top without being cancelable. Therefore, interstitials can be skipped at any time.

Tracking
  The ad tracking is done automatically when using interstitials.

Behaviour

  | Audio with Banner | Video
  --- | --- | ---
  Screen orientation | Multi-Orientation | Locked to the video orientation
  Start from background | Will be played when app comes back to foreground | Will be played when app comes back to foreground
  Move to background | Continues playing | Is skipped

## Member Function Documentation

## ◆ debugErrorToStr()

static String com.tritondigital.ads.Interstitial.debugErrorToStr | ( | int | errorCode | ) |
| static

Converts the error codes to a string.

Note
  Only use for debugging purpose.

## ◆ release()

void com.tritondigital.ads.Interstitial.release | ( |  | ) |

Destroys the Interstitial.

No other methods should be called this.

You'll get a "leaked broadcast receiver" message if you don't call this method before leaving your application.

The documentation for this class was generated from the following file:

- sdk/src/main/java/com/tritondigital/ads/Interstitial.java