Commit 27953e96 authored by mengcuiguang's avatar mengcuiguang

添加网赚视频接口调用gromore方式

parent 2c3ea053
......@@ -146,30 +146,6 @@ public class FullGroManager {
}
public void showFullAd() {
if (BuildConfig.DEBUG) {
LogUtil.d(TAG, "showFullAd isLoadSuccess=" + isLoadSuccess + " isReady=" + mTTFullVideoAd.isReady());
}
if (isLoadSuccess && mTTFullVideoAd != null && mTTFullVideoAd.isReady() && activity != null) {
//设置监听器
mTTFullVideoAd.showFullAd(activity, mTTFullVideoAdListener);
HashMap<String, Object> vo = new HashMap<>();
vo.put("adcode", mTTFullVideoAd.getAdNetworkRitId());
vo.put("ecpm", mTTFullVideoAd.getPreEcpm());
vo.put("adSource", mTTFullVideoAd.getAdNetworkPlatformId());
vo.put("adType", Constant.GRO_MORE_ADTYPE4);
vo.put("adid", fullId);
TrackManager.getInstance().cmtGroMoreInfo(vo);
} else {
// 当加载到广告后 ,长时间未展示失效时 改变状态
isLoadSuccess = false;
if (this.wifiAdStatusListener != null) {
this.wifiAdStatusListener.adFail();
}
}
}
public void showFullAd(Activity _activity, WifiAdStatusListener wifiAdStatusListener) {
if (wifiAdStatusListener != null) {
this.wifiAdStatusListener = wifiAdStatusListener;
......@@ -180,14 +156,6 @@ public class FullGroManager {
if (isLoadSuccess && mTTFullVideoAd != null && mTTFullVideoAd.isReady() && activity != null) {
//设置监听器
mTTFullVideoAd.showFullAd(_activity, mTTFullVideoAdListener);
HashMap<String, Object> vo = new HashMap<>();
vo.put("adcode", mTTFullVideoAd.getAdNetworkRitId());
vo.put("ecpm", mTTFullVideoAd.getPreEcpm());
vo.put("adSource", mTTFullVideoAd.getAdNetworkPlatformId());
vo.put("adType", Constant.GRO_MORE_ADTYPE4);
vo.put("adid", fullId);
TrackManager.getInstance().cmtGroMoreInfo(vo);
} else {
// 当加载到广告后 ,长时间未展示失效时 改变状态
isLoadSuccess = false;
......@@ -204,6 +172,15 @@ public class FullGroManager {
@Override
public void onFullVideoAdShow() {
if (mTTFullVideoAd != null) {
HashMap<String, Object> vo = new HashMap<>();
vo.put("adcode", mTTFullVideoAd.getAdNetworkRitId());
vo.put("ecpm", mTTFullVideoAd.getPreEcpm());
vo.put("adSource", mTTFullVideoAd.getAdNetworkPlatformId());
vo.put("adType", Constant.GRO_MORE_ADTYPE4);
vo.put("adid", fullId);
TrackManager.getInstance().cmtGroMoreInfo(vo);
}
Log.d(TAG, "onFullVideoAdShow");
}
......
......@@ -126,18 +126,6 @@ public class InterstitialGroManager {
//设置监听器
mInterstitialAd.setTTAdInterstitialListener(interstitialListener);
mInterstitialAd.showAd(activity);
HashMap<String, Object> vo = new HashMap<>();
vo.put("adcode", mInterstitialAd.getAdNetworkRitId());
vo.put("ecpm", mInterstitialAd.getPreEcpm());
vo.put("adSource", mInterstitialAd.getAdNetworkPlatformId());
vo.put("adType", Constant.GRO_MORE_ADTYPE3);
if (isMain) {
vo.put("adid", CsjGroMoreManager.INSTANCE.getAPP_IN_COMMON_AD_UNIT_NEW_INTERSTITIAL_ID());
} else {
vo.put("adid", CsjGroMoreManager.INSTANCE.getAPP_IN_MAIN_AD_UNIT_INTERSTITIAL_ID());
}
TrackManager.getInstance().cmtGroMoreInfo(vo);
} else {
// 当加载到广告后 ,长时间未展示失效时 改变状态
isLoadSuccess = false;
......@@ -156,14 +144,6 @@ public class InterstitialGroManager {
//设置监听器
mInterstitialAd.setTTAdInterstitialListener(interstitialListener);
mInterstitialAd.showAd(_activity);
HashMap<String, Object> vo = new HashMap<>();
vo.put("adcode", mInterstitialAd.getAdNetworkRitId());
vo.put("ecpm", mInterstitialAd.getPreEcpm());
vo.put("adSource", mInterstitialAd.getAdNetworkPlatformId());
vo.put("adType", Constant.GRO_MORE_ADTYPE3);
vo.put("adid", interstitialId);
TrackManager.getInstance().cmtGroMoreInfo(vo);
} else {
if (this.wifiAdStatusListener != null) {
this.wifiAdStatusListener.adFail();
......@@ -180,6 +160,16 @@ public class InterstitialGroManager {
*/
@Override
public void onInterstitialShow() {
if (mInterstitialAd != null) {
HashMap<String, Object> vo = new HashMap<>();
vo.put("adcode", mInterstitialAd.getAdNetworkRitId());
vo.put("ecpm", mInterstitialAd.getPreEcpm());
vo.put("adSource", mInterstitialAd.getAdNetworkPlatformId());
vo.put("adType", Constant.GRO_MORE_ADTYPE3);
vo.put("adid", interstitialId);
TrackManager.getInstance().cmtGroMoreInfo(vo);
}
AppConfig.isShowInsertScreen = true;
}
......
......@@ -2,6 +2,8 @@ package com.mints.flowbox.ad.video;
import android.app.Activity;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.bytedance.sdk.openadsdk.AdSlot;
import com.bytedance.sdk.openadsdk.TTAdConstant;
import com.bytedance.sdk.openadsdk.TTAdNative;
......@@ -10,10 +12,14 @@ import com.bytedance.sdk.openadsdk.TTFullScreenVideoAd;
import com.mints.flowbox.MintsApplication;
import com.mints.flowbox.ad.video.base.BaseVideoAd;
import com.mints.flowbox.ad.video.base.VideoAdStatusListener;
import com.mints.flowbox.common.AppConfig;
import com.mints.flowbox.common.Constant;
import com.mints.flowbox.manager.CsjGroMoreManager;
import com.mints.flowbox.manager.TrackManager;
import com.mints.flowbox.manager.TtCsjAdManager;
import java.util.HashMap;
/**
* 穿山甲全屏广告
*/
......@@ -95,6 +101,14 @@ public class CsjFullVideoAdManager extends BaseVideoAd {
if (activity != null) {
TrackManager.getInstance().reportAddCoinMsg(activity, getAdMapVO(carrierType, Constant.AD_SOURCE_CSJFULL, extraId, curCoin));
HashMap<String, Object> vo = new HashMap<>();
vo.put("adcode", TtCsjAdManager.TT_AD_FULLVEDIO_ALL);
vo.put("ecpm", "");
vo.put("adSource", Constant.AD_SOURCE_CSJFULL);
vo.put("adType", Constant.GRO_MORE_ADTYPE4);
vo.put("adid", "");
TrackManager.getInstance().cmtGroMoreInfo(vo);
}
}
......
......@@ -158,6 +158,14 @@ public class CsjVideoAdManager extends BaseVideoAd {
public void onAdClose() {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_THREE, "", "");
HashMap<String, Object> vo = new HashMap<>();
vo.put("adcode", codeId);
vo.put("ecpm", "");
vo.put("adSource", Constant.AD_SOURCE_CSJ);
vo.put("adType", Constant.GRO_MORE_ADTYPE2);
vo.put("adid","");
TrackManager.getInstance().cmtGroMoreInfo(vo);
if (videoAdStatusListener != null) {
videoAdStatusListener.adSuccess();
}
......
......@@ -12,6 +12,7 @@ import com.mints.flowbox.common.Constant
import com.mints.flowbox.manager.TrackManager
import com.mints.flowbox.manager.ad.KsManager
import com.mints.flowbox.utils.LogUtil
import java.util.*
private val TAG = KsVideoAdManager::class.java.simpleName
......@@ -65,6 +66,14 @@ class KsVideoAdManager public constructor() :
override fun onPageDismiss() {
// ToastUtil.show(activity, "快手激励视频⼴告关闭")
val vo = HashMap<String, Any>()
vo["adcode"] = KsManager.KS_AD_VEDIO_POSTID
vo["ecpm"] = ""
vo["adSource"] = Constant.AD_SOURCE_KS
vo["adType"] = Constant.GRO_MORE_ADTYPE2
vo["adid"] = ""
TrackManager.getInstance().cmtGroMoreInfo(vo)
TrackManager.getInstance().reportAddCoinMsg(activity, getAdMapVO(carrierType, Constant.AD_SOURCE_KS, extraId, curCoin))
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_THREE, "", "")
......
......@@ -6,12 +6,14 @@ import com.mints.flowbox.ad.video.base.VideoAdStatusListener
import com.mints.flowbox.common.AppConfig
import com.mints.flowbox.common.Constant
import com.mints.flowbox.manager.TrackManager
import com.mints.flowbox.manager.ad.KsManager
import com.mints.flowbox.manager.ad.OwManager
import com.mints.flowbox.utils.LogUtil
import mobi.oneway.export.Ad.OWRewardedAd
import mobi.oneway.export.AdListener.OWRewardedAdListener
import mobi.oneway.export.enums.OnewayAdCloseType
import mobi.oneway.export.enums.OnewaySdkError
import java.util.HashMap
private val TAG = OwVideoAdManager::class.java.simpleName
......@@ -57,6 +59,14 @@ class OwVideoAdManager public constructor() :
}
override fun onAdClose(tag: String, onewayVideoCloseType: OnewayAdCloseType) {
val vo = HashMap<String, Any>()
vo["adcode"] = OwManager.REWARD_PID
vo["ecpm"] = ""
vo["adSource"] = Constant.AD_SOURCE_OW
vo["adType"] = Constant.GRO_MORE_ADTYPE2
vo["adid"] = ""
TrackManager.getInstance().cmtGroMoreInfo(vo)
TrackManager.getInstance().reportAddCoinMsg(activity, getAdMapVO(carrierType, Constant.AD_SOURCE_OW, extraId, curCoin))
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_OW, Constant.EVENT_TYPE_THREE, "", "")
......
......@@ -6,9 +6,11 @@ import com.mints.flowbox.ad.video.base.VideoAdStatusListener
import com.mints.flowbox.common.AppConfig
import com.mints.flowbox.common.Constant
import com.mints.flowbox.manager.TrackManager
import com.mints.flowbox.manager.ad.OwManager
import com.mints.flowbox.manager.ad.WnManager
import com.mints.flowbox.utils.LogUtil
import com.wannuosili.sdk.*
import java.util.HashMap
private val TAG = WnVideoAdManager::class.java.simpleName
......@@ -71,6 +73,14 @@ class WnVideoAdManager public constructor() :
}
override fun onAdClose() {
val vo = HashMap<String, Any>()
vo["adcode"] = postId
vo["ecpm"] = ""
vo["adSource"] = Constant.AD_SOURCE_SDHZ
vo["adType"] = Constant.GRO_MORE_ADTYPE2
vo["adid"] = ""
TrackManager.getInstance().cmtGroMoreInfo(vo)
TrackManager.getInstance().reportAddCoinMsg(activity, getAdMapVO(carrierType, Constant.AD_SOURCE_SDHZ, extraId, curCoin))
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SDHZ, Constant.EVENT_TYPE_THREE, "", "")
......
......@@ -9,12 +9,14 @@ import com.mints.flowbox.ad.video.base.VideoAdStatusListener;
import com.mints.flowbox.common.AppConfig;
import com.mints.flowbox.common.Constant;
import com.mints.flowbox.manager.TrackManager;
import com.mints.flowbox.manager.TtCsjAdManager;
import com.mints.flowbox.manager.ad.YlhAdManager;
import com.mints.flowbox.utils.LogUtil;
import com.qq.e.ads.rewardvideo.RewardVideoAD;
import com.qq.e.ads.rewardvideo.RewardVideoADListener;
import com.qq.e.comm.util.AdError;
import java.util.HashMap;
import java.util.Map;
/**
......@@ -126,6 +128,14 @@ public class YlhVideoAdManager extends BaseVideoAd {
@Override
public void onADClose() {//激励视频广告被关闭
HashMap<String, Object> vo = new HashMap<>();
vo.put("adcode", ylhPostId);
vo.put("ecpm", "");
vo.put("adSource", Constant.AD_SOURCE_YLH);
vo.put("adType", Constant.GRO_MORE_ADTYPE2);
vo.put("adid", "");
TrackManager.getInstance().cmtGroMoreInfo(vo);
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_YLH, Constant.EVENT_TYPE_THREE, "", "");
TrackManager.getInstance().reportAddCoinMsg(activity, getAdMapVO(carrierType, Constant.AD_SOURCE_YLH, extraId, curCoin));
......
......@@ -171,7 +171,6 @@ public class SplashGroMoreActivity extends BaseActivity implements SplashView {
goToMainActivity();
}, 500);
}
@Override
......@@ -186,14 +185,6 @@ public class SplashGroMoreActivity extends BaseActivity implements SplashView {
mTTSplashAd.showAd(mSplashContainer);
isBaiduSplashAd = mTTSplashAd.getAdNetworkPlatformId() == NetworkPlatformConst.SDK_NAME_BAIDU;
// 获取本次waterfall加载中,加载失败的adn错误信息。
HashMap<String, Object> vo = new HashMap<>();
vo.put("adcode", mTTSplashAd.getAdNetworkRitId());
vo.put("ecpm", mTTSplashAd.getPreEcpm());
vo.put("adSource", mTTSplashAd.getAdNetworkPlatformId());
vo.put("adType", Constant.GRO_MORE_ADTYPE0);
vo.put("adid", CsjGroMoreManager.INSTANCE.getAPP_IN_MAIN_AD_UNIT_SPLASH_ID());
TrackManager.getInstance().cmtGroMoreInfo(vo);
}
LogUtil.d(TAG, "load splash ad success ");
}, 500);
......@@ -224,6 +215,16 @@ public class SplashGroMoreActivity extends BaseActivity implements SplashView {
@Override
public void onAdShow() {
if (mTTSplashAd != null) {
HashMap<String, Object> vo = new HashMap<>();
vo.put("adcode", mTTSplashAd.getAdNetworkRitId());
vo.put("ecpm", mTTSplashAd.getPreEcpm());
vo.put("adSource", mTTSplashAd.getAdNetworkPlatformId());
vo.put("adType", Constant.GRO_MORE_ADTYPE0);
vo.put("adid", CsjGroMoreManager.INSTANCE.getAPP_IN_MAIN_AD_UNIT_SPLASH_ID());
TrackManager.getInstance().cmtGroMoreInfo(vo);
}
LogUtil.d(TAG, "onAdShow");
}
......@@ -334,7 +335,7 @@ public class SplashGroMoreActivity extends BaseActivity implements SplashView {
@Override
public void doInIOThread() {
LogUtil.d(TAG, "子线程判断是否加载开屏");
setT(DeviceInfo.Companion.getInstance().getAPPInstalledThreeDay(MintsApplication.getContext(),data.getCloseNeedInitAppsCount()));
setT(DeviceInfo.Companion.getInstance().getAPPInstalledThreeDay(MintsApplication.getContext(), data.getCloseNeedInitAppsCount()));
}
@Override
......@@ -356,7 +357,7 @@ public class SplashGroMoreActivity extends BaseActivity implements SplashView {
mMainHandler.postDelayed(() -> {
goToMainActivity();
}, 5000);
}else{
} else {
initData();
}
}
......
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