admin
2024-09-13 23cb5200b7a8fb57af5e8006612181bae9c0c95d
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);
            }