> For the complete documentation index, see [llms.txt](https://intowow.gitbook.io/crystalexpress-documentation-v3-x/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://intowow.gitbook.io/crystalexpress-documentation-v3-x/android-sdk/api-reference/instreamad/instreamadlistener.md).

# InstreamAdListener

**package com.intowow\.sdk.InstreamAd**

**public static interface InstreamAdListener**

This interface is used for `InstreamAd` to get the result of requesting and ad status

| Public methods |                                                                                                                                                                                                                                                                             |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| void           | <p><a href="/crystalexpress-documentation-v3-x/android-sdk/api-reference/instreamad/instreamadlistener.md#onAdClicked">onAdClicked(InStreamAd ad)</a> <br> On ad clicked.</p>                                                                                               |
| void           | <p><a href="/crystalexpress-documentation-v3-x/android-sdk/api-reference/instreamad/instreamadlistener.md#onAdImpression">onAdImpression(InStreamAd ad)</a> <br> On ad impression.</p>                                                                                      |
| void           | <p><a href="/crystalexpress-documentation-v3-x/android-sdk/api-reference/instreamad/instreamadlistener.md#onAdMute">onAdMute(InStreamAd ad)</a> <br> On ad mute.</p>                                                                                                        |
| void           | <p><a href="/crystalexpress-documentation-v3-x/android-sdk/api-reference/instreamad/instreamadlistener.md#onAdUnmute">onAdUnmute(InStreamAd ad)</a> <br> On ad unmute.</p>                                                                                                  |
| void           | <p><a href="/crystalexpress-documentation-v3-x/android-sdk/api-reference/instreamad/instreamadlistener.md#onAdError">onAdError(InStreamAd ad, AdError error)</a> <br> load ad fail.</p>                                                                                     |
| void           | <p><a href="/crystalexpress-documentation-v3-x/android-sdk/api-reference/instreamad/instreamadlistener.md#onAdVideoEnd">onAdVideoEnd(InStreamAd ad)</a> <br> On video play end</p>                                                                                          |
| void           | <p><a href="/crystalexpress-documentation-v3-x/android-sdk/api-reference/instreamad/instreamadlistener.md#onAdVideoStart">onAdVideoStart(InStreamAd ad)</a> <br> On video start to play</p>                                                                                 |
| void           | <p><a href="/crystalexpress-documentation-v3-x/android-sdk/api-reference/instreamad/instreamadlistener.md#onProgress">onProgress(InStreamAd ad, long totalDuration, long currentPosition)</a> <br> On progress of video</p>                                                 |
| void           | <p><a href="/crystalexpress-documentation-v3-x/android-sdk/api-reference/instreamad/instreamadlistener.md#onRequestContentPause">onRequestContentPause(InStreamAd ad, int adBreakType, int cuePointTime)</a> <br> On request video content stop as ad is ready to start</p> |
| void           | <p><a href="/crystalexpress-documentation-v3-x/android-sdk/api-reference/instreamad/instreamadlistener.md#onRequestContentResume">onRequestContentResume(InStreamAd ad, int adRemainTime)</a> <br> On request video content play as ad is ready to stop</p>                 |
| void           | <p><a href="/crystalexpress-documentation-v3-x/android-sdk/api-reference/instreamad/instreamadlistener.md#onCuePointsReady">onCuePointsReady(InStreamAd ad)</a> <br> On cue points for ad is already prepared.</p>                                                          |
|                |                                                                                                                                                                                                                                                                             |

## Public methods

### onAdClicked <a href="#onadclicked" id="onadclicked"></a>

void onAdClicked(InStreamAd ad)

On ad clicked.

| Parameters |                                       |
| ---------- | ------------------------------------- |
| ad         | \[InStreamAd]\[1]: The Ad you loaded. |

### onAdImpression <a href="#onadimpression" id="onadimpression"></a>

void onAdImpression(InStreamAd ad)

On ad impression.

| Parameters |                                       |
| ---------- | ------------------------------------- |
| ad         | \[InStreamAd]\[1]: The Ad you loaded. |

### onAdMute <a href="#onadmute" id="onadmute"></a>

void onAdMute(InStreamAd ad)

On ad mute.

| Parameters |                                       |
| ---------- | ------------------------------------- |
| ad         | \[InStreamAd]\[1]: The Ad you loaded. |

### onAdUnmute <a href="#onadunmute" id="onadunmute"></a>

void onAdUnmute(InStreamAd ad)

On ad unmute.

| Parameters |                               |
| ---------- | ----------------------------- |
| ad         | \[Ad]\[1]: The Ad you loaded. |

### onAdError <a href="#onaderror" id="onaderror"></a>

void onAdError(InStreamAd ad, AdError error)

Load ad fail.

| Parameters |                                                                                                                                                                                              |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ad         | \[InStreamAd]\[1]: The Ad you loaded.                                                                                                                                                        |
| error      | [AdError](https://github.com/intowow/crystalexpress-documentation-v3-x/tree/eea8a8ed348d77ae2fac3bcbe123fc19fcc36f5c/android/api_reference/in-streamad/AdError.html): The error information. |

### onAdVideoEnd <a href="#onadvideoend" id="onadvideoend"></a>

void onAdVideoEnd(InStreamAd ad)

On video play end.

| Parameters |                                       |
| ---------- | ------------------------------------- |
| ad         | \[InStreamAd]\[1]: The Ad you loaded. |

### onAdVideoStart <a href="#onadvideostart" id="onadvideostart"></a>

void onAdVideoStart(InStreamAd ad)

On video start to play.

| Parameters |                                       |
| ---------- | ------------------------------------- |
| ad         | \[InStreamAd]\[1]: The Ad you loaded. |

### onProgress <a href="#onprogress" id="onprogress"></a>

void onProgress(InStreamAd ad, long totalDuration, long currentPosition)

On video play in progress.

| Parameters      |                                        |
| --------------- | -------------------------------------- |
| ad              | \[InStreamAd]\[1]: The Ad you loaded.  |
| totalDuration   | long: Duration of current InStream ad. |
| currentPosition | long: The video current play position. |

### onRequestContentPause <a href="#onrequestcontentpause" id="onrequestcontentpause"></a>

void onRequestContentPause(InStreamAd ad, int adBreakType, int cuePointTime)

On request video content stop as ad is ready to start.

| Parameters   |                                       |
| ------------ | ------------------------------------- |
| ad           | \[InStreamAd]\[1]: The Ad you loaded. |
| adBreakType  | int: The type of presenting ad break. |
| cuePointTime | int: The video current play position. |

### onRequestContentResume <a href="#onrequestcontentresume" id="onrequestcontentresume"></a>

void onRequestContentResume(InStreamAd ad, int adRemainTime)

On request video content play as ad is ready to stop.

| Parameters   |                                                           |
| ------------ | --------------------------------------------------------- |
| ad           | \[InStreamAd]\[1]: The Ad you loaded.                     |
| adRemainTime | int: The remain time for this ad if ad did not reach end. |

### onCuePointsReady <a href="#oncuepointsready" id="oncuepointsready"></a>

void onCuePointsReady(InStreamAd ad)

On cue points for ad is already prepared.

| Parameters |                                       |
| ---------- | ------------------------------------- |
| ad         | \[InStreamAd]\[1]: The Ad you loaded. |

\[1]: ./ad.html
