From 23cb5200b7a8fb57af5e8006612181bae9c0c95d Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 13 九月 2024 14:51:17 +0800 Subject: [PATCH] '功能完善' --- BuWanVideo/src/com/weikou/beibeivideo/util/ad/FullVideoAdManager.java | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/BuWanVideo/src/com/weikou/beibeivideo/util/ad/FullVideoAdManager.java b/BuWanVideo/src/com/weikou/beibeivideo/util/ad/FullVideoAdManager.java index bf3f562..2225573 100644 --- a/BuWanVideo/src/com/weikou/beibeivideo/util/ad/FullVideoAdManager.java +++ b/BuWanVideo/src/com/weikou/beibeivideo/util/ad/FullVideoAdManager.java @@ -3,6 +3,7 @@ import android.app.Activity; import android.content.Context; import android.os.Build; +import android.util.Log; import android.widget.Toast; import com.bytedance.sdk.openadsdk.AdSlot; @@ -51,7 +52,7 @@ int w = DimenUtils.getScreenWidth(context); int h = DimenUtils.getScreenHeight(context); String channel = AndroidManifestUtil.getChannel(context); - String pid = "945393854"; + String pid =AndroidManifestUtil.isVIVOChannel(context)?CSJConstant.VIDEO_DETAIL_INTERSTITIALAD_VIVO : CSJConstant.VIDEO_DETAIL_INTERSTITIALAD; if ("huawei".equalsIgnoreCase(channel)) { pid = "948943768"; } @@ -60,7 +61,7 @@ AdSlot adSlot = new AdSlot.Builder() .setCodeId(pid) .setSupportDeepLink(true) - .setExpressViewAcceptedSize(w, h) + .setExpressViewAcceptedSize(200, 300) .setOrientation(TTAdConstant.VERTICAL) .build(); TTAdManager ttAdManager = null; @@ -75,6 +76,7 @@ mTTAdNative.loadFullScreenVideoAd(adSlot, new TTAdNative.FullScreenVideoAdListener() { @Override public void onError(int code, String message) { + Log.i("loadFullScreenVideoAd","onError"); } @Override @@ -105,7 +107,7 @@ }); - if (ad != null && adListener != null) + if (adListener != null) adListener.onSuccess(ad); } -- Gitblit v1.8.0