Commit 9e6d9c92 authored by mengcuiguang's avatar mengcuiguang

添加激励视频日志

parent 151f85f2
...@@ -12,12 +12,15 @@ import com.mints.goodmoney.ad.video.base.VideoAdStatusListener; ...@@ -12,12 +12,15 @@ import com.mints.goodmoney.ad.video.base.VideoAdStatusListener;
import com.mints.goodmoney.common.Constant; import com.mints.goodmoney.common.Constant;
import com.mints.goodmoney.manager.TrackManager; import com.mints.goodmoney.manager.TrackManager;
import com.mints.goodmoney.manager.TtCsjAdManager; import com.mints.goodmoney.manager.TtCsjAdManager;
import com.mints.goodmoney.utils.LogUtil;
/** /**
* 穿山甲全屏广告 * 穿山甲全屏广告
*/ */
public class CsjFullVideoAdManager extends BaseVideoAd { public class CsjFullVideoAdManager extends BaseVideoAd {
private static final String TAG = CsjFullVideoAdManager.class.getSimpleName();
private static CsjFullVideoAdManager _inst; private static CsjFullVideoAdManager _inst;
private VideoAdStatusListener videoAdStatusListener; private VideoAdStatusListener videoAdStatusListener;
...@@ -66,6 +69,8 @@ public class CsjFullVideoAdManager extends BaseVideoAd { ...@@ -66,6 +69,8 @@ public class CsjFullVideoAdManager extends BaseVideoAd {
ttAdNative.loadFullScreenVideoAd(adSlot, new TTAdNative.FullScreenVideoAdListener() { ttAdNative.loadFullScreenVideoAd(adSlot, new TTAdNative.FullScreenVideoAdListener() {
@Override @Override
public void onError(int code, String message) { public void onError(int code, String message) {
LogUtil.d(TAG, "onError " + String.valueOf(code) + message);
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_ONE, String.valueOf(code), message); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_ONE, String.valueOf(code), message);
if (videoAdStatusListener != null) { if (videoAdStatusListener != null) {
...@@ -127,6 +132,8 @@ public class CsjFullVideoAdManager extends BaseVideoAd { ...@@ -127,6 +132,8 @@ public class CsjFullVideoAdManager extends BaseVideoAd {
mttFullVideoAd.showFullScreenVideoAd(activity); mttFullVideoAd.showFullScreenVideoAd(activity);
mttFullVideoAd = null; mttFullVideoAd = null;
} else { } else {
LogUtil.d(TAG, " onFullScreenVideoCached onError ");
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_ONE, "999999", "Cached Fail"); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_ONE, "999999", "Cached Fail");
if (videoAdStatusListener != null) { if (videoAdStatusListener != null) {
......
...@@ -147,7 +147,7 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd { ...@@ -147,7 +147,7 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_GROMORE, Constant.EVENT_TYPE_ONE, String.valueOf(adError.code), adError.message); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_GROMORE, Constant.EVENT_TYPE_ONE, String.valueOf(adError.code), adError.message);
LogUtil.d("vedioAdStatusListener", "onError " + String.valueOf(adError.code) + adError.message); LogUtil.d(TAG, "onError " + String.valueOf(adError.code) + adError.message);
if (videoAdStatusListener != null) { if (videoAdStatusListener != null) {
videoAdStatusListener.adFail(); videoAdStatusListener.adFail();
} }
...@@ -171,6 +171,7 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd { ...@@ -171,6 +171,7 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
} else { } else {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_GROMORE, Constant.EVENT_TYPE_ONE, "999999", "Cached Fail"); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_GROMORE, Constant.EVENT_TYPE_ONE, "999999", "Cached Fail");
LogUtil.d(TAG, " onRewardVideoCached onError ");
if (videoAdStatusListener != null) { if (videoAdStatusListener != null) {
videoAdStatusListener.adFail(); videoAdStatusListener.adFail();
...@@ -263,7 +264,7 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd { ...@@ -263,7 +264,7 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
String adnName = (String) customData.get(RewardItem.KEY_ADN_NAME); String adnName = (String) customData.get(RewardItem.KEY_ADN_NAME);
switch (adnName) { switch (adnName) {
case RewardItem.KEY_GDT: case RewardItem.KEY_GDT:
Logger.d(TAG, "rewardItem gdt: " + customData.get(RewardItem.KEY_GDT_TRANS_ID)); Log.d(TAG, "rewardItem gdt: " + customData.get(RewardItem.KEY_GDT_TRANS_ID));
break; break;
} }
} }
......
...@@ -29,6 +29,8 @@ import java.util.HashMap; ...@@ -29,6 +29,8 @@ import java.util.HashMap;
*/ */
public class CsjVideoAdManager extends BaseVideoAd { public class CsjVideoAdManager extends BaseVideoAd {
private static final String TAG = CsjVideoAdManager.class.getSimpleName();
private static CsjVideoAdManager _inst; private static CsjVideoAdManager _inst;
private AppPreferences ps; private AppPreferences ps;
private int curCoin; private int curCoin;
...@@ -150,7 +152,7 @@ public class CsjVideoAdManager extends BaseVideoAd { ...@@ -150,7 +152,7 @@ public class CsjVideoAdManager extends BaseVideoAd {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_ONE, String.valueOf(code), message); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_ONE, String.valueOf(code), message);
LogUtil.d("vedioAdStatusListener", "onError " + code + message); LogUtil.d(TAG, "onError " + code + message);
if (videoAdStatusListener != null) { if (videoAdStatusListener != null) {
videoAdStatusListener.adFail(); videoAdStatusListener.adFail();
} }
...@@ -164,6 +166,7 @@ public class CsjVideoAdManager extends BaseVideoAd { ...@@ -164,6 +166,7 @@ public class CsjVideoAdManager extends BaseVideoAd {
mttRewardVideoAd = null; mttRewardVideoAd = null;
} else { } else {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_ONE, "999999", "Cached Fail"); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_ONE, "999999", "Cached Fail");
LogUtil.d(TAG, " onRewardVideoCached onError ");
if (videoAdStatusListener != null) { if (videoAdStatusListener != null) {
videoAdStatusListener.adFail(); videoAdStatusListener.adFail();
...@@ -218,6 +221,7 @@ public class CsjVideoAdManager extends BaseVideoAd { ...@@ -218,6 +221,7 @@ public class CsjVideoAdManager extends BaseVideoAd {
@Override @Override
public void onVideoError() { public void onVideoError() {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_ONE, "999999", "VideoError"); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_ONE, "999999", "VideoError");
LogUtil.d(TAG, " onVideoError onError ");
if (videoAdStatusListener != null) { if (videoAdStatusListener != null) {
videoAdStatusListener.adFail(); videoAdStatusListener.adFail();
......
...@@ -57,7 +57,7 @@ class KsVideoAdManager private constructor(activity: Activity) : ...@@ -57,7 +57,7 @@ class KsVideoAdManager private constructor(activity: Activity) :
override fun onError(p0: Int, p1: String?) { override fun onError(p0: Int, p1: String?) {
videoAdStatusListener?.adFail() videoAdStatusListener?.adFail()
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_ONE, p0.toString(), p1) TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_ONE, p0.toString(), p1)
LogUtil.d(TAG, "onError"+p0+p1)
} }
override fun onRewardVideoAdLoad(p0: MutableList<KsRewardVideoAd>?) { override fun onRewardVideoAdLoad(p0: MutableList<KsRewardVideoAd>?) {
...@@ -94,6 +94,7 @@ class KsVideoAdManager private constructor(activity: Activity) : ...@@ -94,6 +94,7 @@ class KsVideoAdManager private constructor(activity: Activity) :
override fun onVideoPlayError(p0: Int, p1: Int) { override fun onVideoPlayError(p0: Int, p1: Int) {
// ToastUtil.show(activity, "快手激励视频⼴告播放出错") // ToastUtil.show(activity, "快手激励视频⼴告播放出错")
LogUtil.d(TAG, "onVideoPlayError"+p0+p1)
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_ONE, (p0).toString(), (p1).toString()) TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_ONE, (p0).toString(), (p1).toString())
......
...@@ -7,6 +7,7 @@ import com.mints.goodmoney.common.AppConfig ...@@ -7,6 +7,7 @@ import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.common.Constant import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.OwManager import com.mints.goodmoney.manager.OwManager
import com.mints.goodmoney.manager.TrackManager import com.mints.goodmoney.manager.TrackManager
import com.mints.goodmoney.utils.LogUtil
import mobi.oneway.export.Ad.OWRewardedAd import mobi.oneway.export.Ad.OWRewardedAd
import mobi.oneway.export.AdListener.OWRewardedAdListener import mobi.oneway.export.AdListener.OWRewardedAdListener
import mobi.oneway.export.enums.OnewayAdCloseType import mobi.oneway.export.enums.OnewayAdCloseType
...@@ -78,6 +79,7 @@ class OwVideoAdManager private constructor() : ...@@ -78,6 +79,7 @@ class OwVideoAdManager private constructor() :
override fun onSdkError(onewaySdkError: OnewaySdkError, msg: String) { override fun onSdkError(onewaySdkError: OnewaySdkError, msg: String) {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_OW, Constant.EVENT_TYPE_ONE, "999999","emun:"+onewaySdkError.name+"msg:"+ msg) TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_OW, Constant.EVENT_TYPE_ONE, "999999","emun:"+onewaySdkError.name+"msg:"+ msg)
LogUtil.d(TAG, "onADError->$msg")
videoAdStatusListener?.adFail() videoAdStatusListener?.adFail()
} }
......
...@@ -21,6 +21,9 @@ import java.util.Map; ...@@ -21,6 +21,9 @@ import java.util.Map;
*/ */
public class YlhVideoAdManager extends BaseVideoAd { public class YlhVideoAdManager extends BaseVideoAd {
private static final String TAG = YlhVideoAdManager.class.getSimpleName();
private static YlhVideoAdManager _inst; private static YlhVideoAdManager _inst;
// 优量汇激励视频 // 优量汇激励视频
...@@ -138,6 +141,7 @@ public class YlhVideoAdManager extends BaseVideoAd { ...@@ -138,6 +141,7 @@ public class YlhVideoAdManager extends BaseVideoAd {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_YLH, Constant.EVENT_TYPE_ONE, "999999", "Load Fail"); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_YLH, Constant.EVENT_TYPE_ONE, "999999", "Load Fail");
LogUtil.d(TAG, " onADLoad onError ");
if (videoAdStatusListener != null) { if (videoAdStatusListener != null) {
videoAdStatusListener.adFail(); videoAdStatusListener.adFail();
...@@ -204,7 +208,7 @@ public class YlhVideoAdManager extends BaseVideoAd { ...@@ -204,7 +208,7 @@ public class YlhVideoAdManager extends BaseVideoAd {
public void onError(AdError adError) {//广告流程出错,AdError中包含错误码和错误描述 public void onError(AdError adError) {//广告流程出错,AdError中包含错误码和错误描述
if (adError != null) { if (adError != null) {
LogUtil.d("YlhVideoAdManager", "onError " + adError.getErrorCode() + adError.getErrorMsg()); LogUtil.d(TAG, "onError " + adError.getErrorCode() + adError.getErrorMsg());
// 0 成功 1失败 2点击 3-有效展示 // 0 成功 1失败 2点击 3-有效展示
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_YLH, Constant.EVENT_TYPE_ONE, String.valueOf(adError.getErrorCode()), adError.getErrorMsg()); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_YLH, Constant.EVENT_TYPE_ONE, String.valueOf(adError.getErrorCode()), adError.getErrorMsg());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment