use of org.prebid.mobile.rendering.models.AdConfiguration in project prebid-mobile-android by prebid.
the class VideoCreative method load.
@Override
public void load() {
// Use URLConnection to download a video file.
BaseNetworkTask.GetUrlParams params = new BaseNetworkTask.GetUrlParams();
params.url = mModel.getMediaUrl();
params.userAgent = AppInfoManager.getUserAgent();
params.requestType = "GET";
params.name = BaseNetworkTask.DOWNLOAD_TASK;
Context context = mContextReference.get();
if (context != null) {
AdConfiguration adConfiguration = mModel.getAdConfiguration();
String shortenedPath = LruController.getShortenedPath(params.url);
File file = new File(context.getFilesDir(), shortenedPath);
VideoDownloadTask videoDownloadTask = new VideoDownloadTask(context, file, new VideoCreativeVideoPreloadListener(this), adConfiguration);
mVideoDownloadTask = videoDownloadTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, params);
}
}
use of org.prebid.mobile.rendering.models.AdConfiguration in project prebid-mobile-android by prebid.
the class VideoCreative method createOmAdSession.
@Override
public void createOmAdSession() {
OmAdSessionManager omAdSessionManager = mWeakOmAdSessionManager.get();
if (omAdSessionManager == null) {
LogUtil.error(TAG, "Error creating AdSession. OmAdSessionManager is null");
return;
}
AdConfiguration adConfiguration = mModel.getAdConfiguration();
ContentObject contentObject = adConfiguration.getAppContent();
String contentUrl = null;
if (contentObject != null)
contentUrl = contentObject.getUrl();
omAdSessionManager.initVideoAdSession(mModel.getAdVerifications(), contentUrl);
startOmSession();
}
Aggregations