Commit 19fe205c authored by jyx's avatar jyx

代码优化

parent 084de85a
......@@ -14,6 +14,7 @@ import com.bytedance.msdk.api.v2.slot.GMAdOptionUtil;
import com.bytedance.msdk.api.v2.slot.GMAdSlotFullVideo;
import com.mints.fiveworld.ad.AdReportManager;
import com.mints.fiveworld.ad.wifi.AppOutWifiAdManager;
import com.mints.fiveworld.ad.wifi.HomeAppOutAdManager;
import com.mints.fiveworld.ad.wifi.WifiAdStatusListener;
import com.mints.fiveworld.common.Constant;
import com.mints.fiveworld.keepalive.OutAppRouter;
......@@ -59,15 +60,15 @@ public class Home_NewOutTimeFull {
this.mActivity = activity;
// TODO 透明页加载广告开始
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_TIME10_NEW_LOAD_START.name());
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_HOME_CLICK_LOAD_START.name());
if (GMMediationAdSdk.configLoadSuccess()) {
// TODO config成功
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_TIME10_NEW_LOAD_START_CONFIG_SUC.name());
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_HOME_CLICK_LOAD_START_CONFIG_SUC.name());
loadAd();
} else {
// TODO config 首次初始化监听
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_TIME10_NEW_LOAD_START_CONFIG.name());
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_HOME_CLICK_LOAD_START_CONFIG.name());
GMMediationAdSdk.registerConfigCallback(mSettingConfigCallback);
}
}
......@@ -77,13 +78,13 @@ public class Home_NewOutTimeFull {
*/
private final GMSettingConfigCallback mSettingConfigCallback = () -> {
// TODO config回调加载广告
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_TIME10_NEW_LOAD_START_CONFIG_LOAD.name());
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_HOME_CLICK_LOAD_START_CONFIG_LOAD.name());
loadAd();
};
private void loadAd() {
if (mActivity == null) {
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_TIME10_NEW_LOAD_START_ACTIVITY_NULL.name());
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_HOME_CLICK_LOAD_START_ACTIVITY_NULL.name());
return;
}
......@@ -123,7 +124,7 @@ public class Home_NewOutTimeFull {
.build();
// TODO 穿山甲加载广告
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_TIME10_NEW_CSJ_LOAD.name());
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_HOME_CLICK_CSJ_LOAD.name());
//请求广告
mTTFullVideoAd.loadAd(adSlotFullVideo, new GMFullVideoAdLoadCallback() {
......@@ -166,7 +167,7 @@ public class Home_NewOutTimeFull {
}
// TODO 穿山甲加载广告成功
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_TIME10_NEW_CSJ_LOAD_SUC.name());
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_HOME_CLICK_CSJ_LOAD_SUC.name());
AdReportManager.INSTANCE.eventFull(
getInner(),
......@@ -188,24 +189,24 @@ public class Home_NewOutTimeFull {
Constant.CARRIER_APP,
"体外广告播放时,预加载广告加载完成,但当前体外场景流程未走完,防止重复弹出")) {
// TODO 拦截
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_TIME10_NEW_CSJ_CACHE_SUC_RETURN.name());
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_HOME_CLICK_CSJ_CACHE_SUC_RETURN.name());
return;
}
AppOutWifiAdManager.Companion.getInstance().routeToTime();
HomeAppOutAdManager.Companion.getInstance().routeToHomeClick();
// if (wifiAdStatusListener != null) {
// wifiAdStatusListener.adSuccess();
// } else {
// // TODO 监听
// UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_TIME10_NEW_LISTENER_NULL.name());
// UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_HOME_CLICK_NEW_LISTENER_NULL.name());
// }
}
@Override
public void onFullVideoCached() {
// TODO 缓存成功
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_TIME10_NEW_CSJ_CACHE_SUC.name());
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_HOME_CLICK_CSJ_CACHE_SUC.name());
LogUtil.d(TAG, "gromore体外定时全屏广告--> 3、Gromore 新插屏onFullVideoCached ");
}
......@@ -223,17 +224,17 @@ public class Home_NewOutTimeFull {
this.wifiAdStatusListener = wifiAdStatusListener;
// TODO 展示打点
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_TIME10_NEW_SHOW_START.name());
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_HOME_CLICK_SHOW_START.name());
if (mActivity == null) {
// TODO 展示Activity 为空
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_TIME10_NEW_SHOW_START_ACTIVITY_NULL.name());
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_HOME_CLICK_SHOW_START_ACTIVITY_NULL.name());
return;
}
if (mTTFullVideoAd == null) {
// TODO 展示TTFullVideoAd 为空
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_TIME10_NEW_SHOW_START_TTFULLVIDEOAD_NULL.name());
UmengManager.INSTANCE.onEvent(AdReportManager.EventType.EVENT_TYPE_HOME_CLICK_SHOW_START_TTFULLVIDEOAD_NULL.name());
return;
}
......
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