use of org.prebid.mobile.rendering.session.manager.OmAdSessionManager in project prebid-mobile-android by prebid.
the class HTMLCreative method createOmAdSession.
@Override
public void createOmAdSession() {
if (getCreativeView() == null || getCreativeView().getWebView() == null) {
LogUtil.error(TAG, "initOmAdSession error. Opex webView is null");
return;
}
OmAdSessionManager omAdSessionManager = mWeakOmAdSessionManager.get();
if (omAdSessionManager == null) {
LogUtil.error(TAG, "Error creating adSession. OmAdSessionManager is null");
return;
}
WebViewBase webView = getCreativeView().getWebView();
AdConfiguration adConfiguration = getCreativeModel().getAdConfiguration();
ContentObject contentObject = adConfiguration.getAppContent();
String contentUrl = null;
if (contentObject != null)
contentUrl = contentObject.getUrl();
omAdSessionManager.initWebAdSessionManager(webView, contentUrl);
startOmSession(omAdSessionManager, webView);
}
use of org.prebid.mobile.rendering.session.manager.OmAdSessionManager in project prebid-mobile-android by prebid.
the class AbstractCreative method updateAdView.
public void updateAdView(View view) {
OmAdSessionManager omAdSessionManager = mWeakOmAdSessionManager.get();
if (omAdSessionManager == null) {
LogUtil.error(TAG, "Unable to updateAdView. OmAdSessionManager is null");
return;
}
omAdSessionManager.registerAdView(view);
}
use of org.prebid.mobile.rendering.session.manager.OmAdSessionManager in project prebid-mobile-android by prebid.
the class VideoCreative method startOmSession.
private void startOmSession() {
OmAdSessionManager omAdSessionManager = mWeakOmAdSessionManager.get();
if (omAdSessionManager == null) {
LogUtil.error(TAG, "startOmSession: Failed. omAdSessionManager is null");
return;
}
if (mVideoCreativeView == null) {
LogUtil.error(TAG, "startOmSession: Failed. VideoCreativeView is null");
return;
}
startOmSession(omAdSessionManager, (View) mVideoCreativeView.getVideoPlayerView());
mModel.registerActiveOmAdSession(omAdSessionManager);
}
use of org.prebid.mobile.rendering.session.manager.OmAdSessionManager 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();
}
use of org.prebid.mobile.rendering.session.manager.OmAdSessionManager in project prebid-mobile-android by prebid.
the class VideoCreative method onVolumeChanged.
@Override
public void onVolumeChanged(float volume) {
notifyVolumeChanged(volume);
OmAdSessionManager omAdSessionManager = mWeakOmAdSessionManager.get();
if (omAdSessionManager == null) {
LogUtil.error(TAG, "trackVolume failed, OmAdSessionManager is null");
return;
}
omAdSessionManager.trackVolumeChange(volume);
}
Aggregations