Search in sources :

Example 6 with OmAdSessionManager

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);
}
Also used : OmAdSessionManager(org.prebid.mobile.rendering.session.manager.OmAdSessionManager) WebViewBase(org.prebid.mobile.rendering.views.webview.WebViewBase) PrebidWebViewBase(org.prebid.mobile.rendering.views.webview.PrebidWebViewBase) ContentObject(org.prebid.mobile.ContentObject)

Example 7 with OmAdSessionManager

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);
}
Also used : OmAdSessionManager(org.prebid.mobile.rendering.session.manager.OmAdSessionManager)

Example 8 with OmAdSessionManager

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);
}
Also used : OmAdSessionManager(org.prebid.mobile.rendering.session.manager.OmAdSessionManager)

Example 9 with 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();
}
Also used : OmAdSessionManager(org.prebid.mobile.rendering.session.manager.OmAdSessionManager) AdConfiguration(org.prebid.mobile.rendering.models.AdConfiguration) ContentObject(org.prebid.mobile.ContentObject)

Example 10 with OmAdSessionManager

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);
}
Also used : OmAdSessionManager(org.prebid.mobile.rendering.session.manager.OmAdSessionManager)

Aggregations

OmAdSessionManager (org.prebid.mobile.rendering.session.manager.OmAdSessionManager)11 ContentObject (org.prebid.mobile.ContentObject)2 AdConfiguration (org.prebid.mobile.rendering.models.AdConfiguration)1 PrebidWebViewBase (org.prebid.mobile.rendering.views.webview.PrebidWebViewBase)1 WebViewBase (org.prebid.mobile.rendering.views.webview.WebViewBase)1