Commit 0e776743 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 6b76aa4c
......@@ -17,6 +17,8 @@ import com.duben.speedplayletu.MintsApplication
import com.duben.speedplayletu.R
import com.duben.speedplayletu.ad.AdManager
import com.duben.speedplayletu.ad.express.ExpressAdCallback
import com.duben.speedplayletu.common.Constant
import com.duben.speedplayletu.manager.TrackManager
import com.duben.speedplayletu.utils.ForegroundOrBackground
import com.duben.speedplayletu.utils.LogUtil
import com.duben.speedplayletu.utils.TimeRender
......@@ -148,6 +150,13 @@ class DrawExpressManager {
private fun showAd(ttFeedAd: TTFeedAd?) {
ttFeedAd?.let {
if (it.mediationManager != null && it.mediationManager.showEcpm != null) {
val ecpm = it.mediationManager.showEcpm.ecpm
val vo = HashMap<String, Any>()
vo["adType"] = Constant.GRO_MORE_ADTYPE4
vo["ecpm"] = ecpm
TrackManager.getInstance().cmtEcpm(vo)
}
if (it.mediationManager.isExpress) {
//--------------信息流模板广告渲染----------------
showExpressView(it)
......
......@@ -17,6 +17,8 @@ import com.duben.speedplayletu.MintsApplication
import com.duben.speedplayletu.R
import com.duben.speedplayletu.ad.AdManager
import com.duben.speedplayletu.ad.express.ExpressAdCallback
import com.duben.speedplayletu.common.Constant
import com.duben.speedplayletu.manager.TrackManager
import com.duben.speedplayletu.utils.ForegroundOrBackground
import com.duben.speedplayletu.utils.LogUtil
import com.duben.speedplayletu.utils.TimeRender
......@@ -141,6 +143,13 @@ class HomeDrawExpressManager {
private fun showAd(ttFeedAd: TTFeedAd?) {
ttFeedAd?.let {
if (it.mediationManager != null && it.mediationManager.showEcpm != null) {
val ecpm = it.mediationManager.showEcpm.ecpm
val vo = HashMap<String, Any>()
vo["adType"] = Constant.GRO_MORE_ADTYPE4
vo["ecpm"] = ecpm
TrackManager.getInstance().cmtEcpm(vo)
}
if (it.mediationManager.isExpress) {
//--------------信息流模板广告渲染----------------
showExpressView(it)
......
......@@ -216,11 +216,6 @@ public class InMoneyVideo {
public void onAdClose() {
LogUtil.d(TAG, "gromore预加载 激励视频广告-->onAdClose");
int adCount = AppPreferencesManager.INSTANCE.get().getInt(Constant.VEDIO_AD_COUNT, 0);
if (adCount < 50) {
AppPreferencesManager.INSTANCE.get().put(Constant.VEDIO_AD_COUNT, adCount + 1);
}
HashMap<String, Object> vo = new HashMap<>();
vo.put("adcode", nowAdcode);
vo.put("ecpm", nowEcpm);
......
......@@ -155,11 +155,6 @@ public class InMoneyVideoNoPre {
public void onAdClose() {
LogUtil.d(TAG, "gromore实时加载 激励视频广告-->onAdClose nowAdcode=" + nowAdcode);
int adCount = AppPreferencesManager.INSTANCE.get().getInt(Constant.VEDIO_AD_COUNT, 0);
if (adCount < 50) {
AppPreferencesManager.INSTANCE.get().put(Constant.VEDIO_AD_COUNT, adCount+1);
}
HashMap<String, Object> vo = new HashMap<>();
vo.put("adcode", nowAdcode);
vo.put("ecpm", nowEcpm);
......
......@@ -18,30 +18,18 @@ object Constant {
const val LOAN_PERMISSION_FLAG = "loan_permission_flag"
const val FIRST_SPLASH = "first_splash"
const val IS_FIRST_AGREE_BTN = "is_first_agree_btn"
const val IS_FIRST_VIP_BTN = "is_first_agree_btn"
const val IS_FIRST_VEDIO = "is_first_vedio"
const val TAG_NAME = "SUN"
const val MINTS_APP_NAME = "极速短剧"
const val MINTS_PKG_NAME = "com.duben.speedplayletu"
const val ACTION_EXIT_APP = "package.exit"
const val LUCKY_FLAG = "LUCKY_FLAG"
const val LUCKY_COMPLETE = "LUCKY_COMPLETE"
const val LUCKY_NEED = "LUCKY_NEED"
const val LUCKY_MY_FIRST = "LUCKY_MY_FIRST"
const val MAIN_FIRST_RECOMMEND = "MAIN_FIRST_RECOMMEND"
const val MAIN_TWO_RECOMMEND = "MAIN_TWO_RECOMMEND"
const val VEDIO_AD_COUNT = "VEDIO_AD_COUNT"
const val VEDIO_MAIN_COUNT = "VEDIO_MAIN_COUNT"
const val CARRIERTYPE_CSJ_VEDIO = "1"
const val CARRIERTYPE_TX_VEDIO = "1"
const val CARRIERTYPE_NINE = "2"
const val CARRIERTYPE_NINE3 = "3"
const val CARRIERTYPE_DRAW_EXPRESS = "4"
/**
* app应用首页 0-主页 1-中间 2-尊享 3-我
*/
......@@ -55,9 +43,10 @@ object Constant {
var PRIVACY_URL = BuildConfig.MainIp+"/agreements/${VersionUtils.getEndPkg()}/syzc.html"//隐私协议
var MEMBERS_URL = BuildConfig.MainIp+"/agreements/${VersionUtils.getEndPkg()}/gmxy.html"//会员付费服务协议
//0-开屏,1-信息流,2-激励视频,3-banner
//0-开屏,1-信息流,2-激励视频,3-banner,4-DRAW信息流
const val GRO_MORE_ADTYPE0 = "0"
const val GRO_MORE_ADTYPE1 = "1"
const val GRO_MORE_ADTYPE2 = "2"
const val GRO_MORE_ADTYPE3 = "3"
const val GRO_MORE_ADTYPE4 = "4"
}
\ No newline at end of file
......@@ -334,7 +334,7 @@ public interface LoanService {
*
* @return
*/
@POST("stasticis/adCall/add")
@POST("api/reporGromeEcpm")
Observable<BaseResponse<Object>> cmtEcpm(@Body Map<String, Object> vo);
......
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