Commit 606a7d0d authored by mengcuiguang2's avatar mengcuiguang2

test

parent 5623c54f
......@@ -808,7 +808,7 @@
-keep public interface com.bytedance.sdk.openadsdk.downloadnew.** {*;}
-keep class com.pgl.sys.ces.* {*;}
//聚合混淆
#聚合混淆
-keep class bykvm*.**
-keep class com.bytedance.msdk.adapter.**{ public *; }
-keep class com.bytedance.msdk.api.** {
......
......@@ -36,7 +36,7 @@ import java.util.HashMap;
import java.util.Map;
/**
* 穿山甲激励视频广告
* GroMore激励视频广告
*/
public class CsjGroMoreVideoAdManager extends BaseVideoAd {
......@@ -46,6 +46,7 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
private AppPreferences ps;
private int curCoin;
private String extraId;
private String carrierType;
private VideoAdStatusListener videoAdStatusListener;
private TTRewardAd mttRewardAd;
......@@ -97,6 +98,7 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
isClickScreen = true;
this.curCoin = curCoin;
this.extraId = extraId;
this.carrierType = carrierType;
/**
* 判断当前是否存在config 配置 ,如果存在直接加载广告 ,如果不存在则注册config加载回调
*/
......@@ -150,7 +152,7 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
@Override
public void onRewardVideoLoadFail(AdError adError) {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, 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);
......@@ -171,7 +173,7 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
//展示广告,并传入广告展示的场景
mttRewardAd.showRewardAd(activity, mTTRewardedAdListener);
} else {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_ONE, "999999", "Cached Fail");
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_GROMORE, Constant.EVENT_TYPE_ONE, "999999", "Cached Fail");
if (videoAdStatusListener != null) {
videoAdStatusListener.adFail();
......@@ -191,7 +193,7 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
*/
public void onRewardedAdShow() {
Log.d(TAG, "onRewardedAdShow");
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_ZERO, "", "");
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_GROMORE, Constant.EVENT_TYPE_ZERO, "", "");
}
......@@ -207,11 +209,11 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
TrackManager.getInstance().reportClickAdEvent();
}
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_TWO, "", "");
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_GROMORE, Constant.EVENT_TYPE_TWO, "", "");
if (isClickScreen) {
// 防止重复
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_FOUR, "", "");
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_GROMORE, Constant.EVENT_TYPE_FOUR, "", "");
isClickScreen = false;
}
if (videoAdStatusListener != null) {
......@@ -225,7 +227,10 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
public void onRewardedAdClosed() {
Log.d(TAG, "onRewardedAdClosed");
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_THREE, "", "");
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_GROMORE, Constant.EVENT_TYPE_THREE, "", "");
TrackManager.getInstance().reportAddCoinMsg(activity, getAdMapVO(carrierType, Constant.AD_SOURCE_GROMORE, extraId, curCoin));
if (videoAdStatusListener != null) {
videoAdStatusListener.adSuccess();
......@@ -245,7 +250,7 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
*/
public void onVideoError() {
Log.d(TAG, "onVideoError");
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJ, Constant.EVENT_TYPE_ONE, "999999", "VideoError");
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_GROMORE, Constant.EVENT_TYPE_ONE, "999999", "VideoError");
if (videoAdStatusListener != null) {
videoAdStatusListener.adFail();
......@@ -277,41 +282,6 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
};
/**
* 封装广告数据,请求服务器
*
* @param carrierType
* @param tid
* @return
*/
private HashMap<String, Object> getAdMapVO(String carrierType, String tid) {
HashMap<String, Object> vo = new HashMap<>();
vo.put("carrierType", carrierType);
vo.put("adtype", Constant.ADTYPE_VEDIO);
vo.put("tid", tid);
vo.put("adsource", Constant.AD_SOURCE_CSJ);
if (ps == null) {
ps = new AppPreferences(activity);
}
vo.put("ip", ps.getString(Constant.CSJ_VEDIO_APPIP, ""));
switch (carrierType) {
case Constant.CARRIER_VERSUS_VIDEO:// 每日任务-视频
vo.put("coin", curCoin);
break;
case Constant.CARRIER_HOMEWATER:// 首页喝水汽泡
vo.put("waterCoin", curCoin);
break;
case Constant.CARRIER_OFFLINE_DOUBLE:// 离线收益翻倍
vo.put("offline_income", curCoin);
case Constant.CARRIER_CHALLENGE_TURN:// 挑战大转盘
case Constant.CARRIER_CHALLENGE_CARD:// 挑战刮刮乐
vo.put("turntableKey", extraId);
break;
}
return vo;
}
public void setVideoAdStatusListener(VideoAdStatusListener videoAdStatusListener) {
this.videoAdStatusListener = videoAdStatusListener;
}
......
......@@ -9,6 +9,7 @@ import com.bytedance.hume.readapk.HumeSDK
import com.mints.goodmoney.MintsApplication
import com.mints.goodmoney.R
import com.mints.goodmoney.ad.banner.BannerManager
import com.mints.goodmoney.ad.video.CsjGroMoreVideoAdManager
import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.TtCsjAdManager
......@@ -43,6 +44,7 @@ class AboutusActivity : BaseActivity(), View.OnClickListener {
ToastUtil.showLong(MintsApplication.getContext(), "自有渠道:" + CommonUtils.getAppMetaData(MintsApplication.getContext(), "CHANNEL_NAME") +
"\n 广告代码位:" + AppConfig.user_channel_ad +
"\n 头条渠道:" + HumeSDK.getChannel(context))
// CsjGroMoreVideoAdManager.getInstance(AboutusActivity@this).loadAd(AboutusActivity@this,0,"","")
true
}
......
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