public class ProcessAdDataTask
extends android.os.AsyncTask<java.lang.String,java.lang.Void,com.brightcove.player.onceux.AdResponse>
| Constructor and Description |
|---|
ProcessAdDataTask(android.content.Context context,
EventEmitter eventEmitter,
com.brightcove.player.onceux.ProtocolType protocol,
com.brightcove.player.onceux.FormatType format,
boolean isHlsRecommended)
Build a task saving the event emitter for handling errors.
|
| Modifier and Type | Method and Description |
|---|---|
protected com.brightcove.player.onceux.AdResponse |
doInBackground(java.lang.String... urls)
Perform the main task: download and process the ad data associated with the given URL
|
protected void |
onPostExecute(com.brightcove.player.onceux.AdResponse adResponse)
Callback executed after the ad server response processing is completed to restart the
video.
|
public ProcessAdDataTask(android.content.Context context,
EventEmitter eventEmitter,
com.brightcove.player.onceux.ProtocolType protocol,
com.brightcove.player.onceux.FormatType format,
boolean isHlsRecommended)
context - The Android application context. Used to establish the localized resources.eventEmitter - The EventEmitter instance which will notify listeners about ad
related events.protocol - The Once protocol choice.format - The Once data format choice.protected com.brightcove.player.onceux.AdResponse doInBackground(java.lang.String... urls)
doInBackground in class android.os.AsyncTask<java.lang.String,java.lang.Void,com.brightcove.player.onceux.AdResponse>urls - An array (varargs) of URL strings. Only a single URL is provided for OnceUX.AsyncTask.doInBackground(Object[])protected void onPostExecute(com.brightcove.player.onceux.AdResponse adResponse)
onPostExecute in class android.os.AsyncTask<java.lang.String,java.lang.Void,com.brightcove.player.onceux.AdResponse>adResponse - The AdResponse object encapsulating the ad server response data or an
error condition if normal processing was unable to complete successfully.AsyncTask.onPostExecute(Object)