Commit b4a361eb authored by mengcuiguang's avatar mengcuiguang

添加新插屏代码位及权重

parent 87a86926
......@@ -43,8 +43,6 @@ public class FullGroManager {
private String fullId;
private ArrayList<WeightBean> weightList;
private int fullInterstitialWeight = 99;
private int interstitialWeight = 1;
public void loadFullAd(Activity activity, boolean isMain) {
// 加载到广告且未展示 则返回
......@@ -157,7 +155,7 @@ public class FullGroManager {
break;
}
LogUtil.d("id:"+id);
LogUtil.d("id:" + id);
return id;
}
......@@ -169,10 +167,16 @@ public class FullGroManager {
}
int weight = 0;
weightList.add(new WeightBean(fullInterstitialWeight, Constant.GROMORE_NEW_FULL_AD));
weight = weight + fullInterstitialWeight;
weightList.add(new WeightBean(interstitialWeight, Constant.GROMORE_NEW_INSERTSCREEN_AD));
weight = weight + interstitialWeight;
int fullInterstitialWeight = CsjGroMoreManager.INSTANCE.getAPP_FULL_NEW_INTERSTITIAL_WEIGHT();
if (fullInterstitialWeight > 0) {
weightList.add(new WeightBean(fullInterstitialWeight, Constant.GROMORE_NEW_FULL_AD));
weight = weight + fullInterstitialWeight;
}
int interstitialWeight = CsjGroMoreManager.INSTANCE.getAPP_NEW_INTERSTITIAL_WEIGHT();
if (interstitialWeight > 0) {
weightList.add(new WeightBean(interstitialWeight, Constant.GROMORE_NEW_INSERTSCREEN_AD));
weight = weight + interstitialWeight;
}
if (weightList != null && weightList.size() > 0 && weight > 0) {
LogUtil.d(TAG, "1、权重总值:" + weight);
......@@ -188,7 +192,7 @@ public class FullGroManager {
}
}
}
return "";
return Constant.GROMORE_NEW_FULL_AD;
}
public void showFullAd() {
......
package com.mints.flowbox.manager
import android.text.TextUtils
import com.mints.flowbox.MintsApplication
import com.mints.flowbox.manager.ad.TTGroMoreAdManagerHolder
import com.mints.flowbox.mvp.model.GroAdcodeBean
......@@ -14,6 +15,7 @@ object CsjGroMoreManager {
* 应用内:
* 普通:
* 新插屏(全屏) -> 946333578
* 新插屏(插屏) ->
* 信息流 -> 946265897
* 网赚:
* 激励视频 -> 946265896
......@@ -23,6 +25,7 @@ object CsjGroMoreManager {
* 应用外:
* 普通:
* 新插屏(全屏) -> 946333773
* 新插屏(插屏) ->
* 信息流 -> 946333992
* 锁屏:
* 信息流 -> 946334023
......@@ -41,6 +44,9 @@ object CsjGroMoreManager {
var APP_IN_MAIN_AD_UNIT_INTERSTITIAL_ID = "946334151" // 应用内 网赚 插屏
var APP_IN_MAIN_AD_UNIT_SPLASH_ID = "887506685" // 应用内 网赚 开屏
var APP_FULL_NEW_INTERSTITIAL_WEIGHT = 2 // 新插屏(全屏)权重
var APP_NEW_INTERSTITIAL_WEIGHT = 1 // 新插屏(插屏)权重
fun init(application: MintsApplication) {
TTGroMoreAdManagerHolder.init(application)
}
......@@ -50,28 +56,49 @@ object CsjGroMoreManager {
*/
fun updataIdByChannel(idBean: GroAdcodeBean?) {
// 渠道对象不为空
if (idBean != null) {
if (idBean.gromoreAdcodes_main != null) { // 应用内网赚
APP_IN_MAIN_AD_UNIT_EXPRESS_ID = idBean.gromoreAdcodes_main.groExpress
APP_IN_MAIN_AD_UNIT_VIDEO_ID = idBean.gromoreAdcodes_main.groVideo
APP_IN_MAIN_AD_UNIT_INTERSTITIAL_ID = idBean.gromoreAdcodes_main.groInterstitial
APP_IN_MAIN_AD_UNIT_SPLASH_ID = idBean.gromoreAdcodes_main.groSplash
idBean?.let {
if (it.gromoreAdcodes_main != null) { // 应用内网赚
if (!TextUtils.isEmpty(it.gromoreAdcodes_main.groExpress)) {
APP_IN_MAIN_AD_UNIT_EXPRESS_ID = it.gromoreAdcodes_main.groExpress
}
if (!TextUtils.isEmpty(it.gromoreAdcodes_main.groVideo)) {
APP_IN_MAIN_AD_UNIT_VIDEO_ID = it.gromoreAdcodes_main.groVideo
}
if (!TextUtils.isEmpty(it.gromoreAdcodes_main.groInterstitial)) {
APP_IN_MAIN_AD_UNIT_INTERSTITIAL_ID = it.gromoreAdcodes_main.groInterstitial
}
if (!TextUtils.isEmpty(it.gromoreAdcodes_main.groSplash)) {
APP_IN_MAIN_AD_UNIT_SPLASH_ID = it.gromoreAdcodes_main.groSplash
}
}
if (it.gromoreAdcodes_ordinary != null) { // 应用内普通
if (!TextUtils.isEmpty(it.gromoreAdcodes_ordinary.groExpress)) {
APP_IN_COMMON_AD_UNIT_EXPRESS_ID = it.gromoreAdcodes_ordinary.groExpress
}
if (!TextUtils.isEmpty(it.gromoreAdcodes_ordinary.groNewInterstitial)) {
APP_IN_COMMON_AD_FULL_UNIT_NEW_INTERSTITIAL_ID = it.gromoreAdcodes_ordinary.groNewInterstitial
}
}
if (idBean.gromoreAdcodes_ordinary != null) { // 应用内普通
APP_IN_COMMON_AD_UNIT_EXPRESS_ID = idBean.gromoreAdcodes_ordinary.groExpress
APP_IN_COMMON_AD_FULL_UNIT_NEW_INTERSTITIAL_ID =
idBean.gromoreAdcodes_ordinary.groNewInterstitial
if (it.gromoreAdcodes_outer_lock != null) { // 应用外锁屏
if (!TextUtils.isEmpty(it.gromoreAdcodes_outer_lock.groExpress)) {
APP_OUT_AD_UNIT_LOCK_EXPRESS_ID = it.gromoreAdcodes_outer_lock.groExpress
}
}
if (idBean.gromoreAdcodes_outer_lock != null) { // 应用外锁屏
APP_OUT_AD_UNIT_LOCK_EXPRESS_ID = idBean.gromoreAdcodes_outer_lock.groExpress
if (it.gromoreAdcodes_outer_ordinary != null) { // 应用外普通
if (!TextUtils.isEmpty(it.gromoreAdcodes_main.groExpress)) {
APP_OUT_AD_UNIT_EXPRESS_ID = it.gromoreAdcodes_main.groExpress
}
if (!TextUtils.isEmpty(it.gromoreAdcodes_outer_ordinary.groNewInterstitial)) {
APP_OUT_AD_UNIT_FULL_NEW_INTERSTITIAL_ID = it.gromoreAdcodes_outer_ordinary.groNewInterstitial
}
}
if (idBean.gromoreAdcodes_outer_ordinary != null) { // 应用外普通
APP_OUT_AD_UNIT_EXPRESS_ID = idBean.gromoreAdcodes_main.groExpress
APP_OUT_AD_UNIT_FULL_NEW_INTERSTITIAL_ID =
idBean.gromoreAdcodes_outer_ordinary.groNewInterstitial
if (it.newnIterstitialHalfRate != null) {// 新插屏权重
APP_NEW_INTERSTITIAL_WEIGHT = it.newnIterstitialHalfRate.half
APP_FULL_NEW_INTERSTITIAL_WEIGHT = it.newnIterstitialHalfRate.full
}
}
}
......
......@@ -7,7 +7,6 @@ import java.io.Serializable;
*/
public class GroAdcodeBean implements Serializable {
/**
* groExpress : 946265897
* groNewInterstitial : 946333578
......@@ -34,6 +33,8 @@ public class GroAdcodeBean implements Serializable {
private GromoreAdcodesOuterOrdinaryDTO gromoreAdcodes_outer_ordinary;
private IterstitialHalfRate newnIterstitialHalfRate;
public GromoreAdcodesOrdinaryDTO getGromoreAdcodes_ordinary() {
return gromoreAdcodes_ordinary;
}
......@@ -66,28 +67,26 @@ public class GroAdcodeBean implements Serializable {
this.gromoreAdcodes_outer_ordinary = gromoreAdcodes_outer_ordinary;
}
public static class GromoreAdcodesOrdinaryDTO {
public class GromoreAdcodesOrdinaryDTO implements Serializable {
private String groExpress;
private String groNewInterstitial;
private String groNewInterstitialHalf;
public String getGroExpress() {
return groExpress;
}
public void setGroExpress(String groExpress) {
this.groExpress = groExpress;
}
public String getGroNewInterstitial() {
return groNewInterstitial;
}
public void setGroNewInterstitial(String groNewInterstitial) {
this.groNewInterstitial = groNewInterstitial;
public String getGroNewInterstitialHalf() {
return groNewInterstitialHalf;
}
}
public static class GromoreAdcodesMainDTO {
public class GromoreAdcodesMainDTO implements Serializable {
private String groVideo;
private String groInterstitial;
private String groExpress;
......@@ -126,7 +125,7 @@ public class GroAdcodeBean implements Serializable {
}
}
public static class GromoreAdcodesOuterLockDTO {
public class GromoreAdcodesOuterLockDTO implements Serializable {
private String groExpress;
public String getGroExpress() {
......@@ -138,24 +137,39 @@ public class GroAdcodeBean implements Serializable {
}
}
public static class GromoreAdcodesOuterOrdinaryDTO {
public class GromoreAdcodesOuterOrdinaryDTO implements Serializable {
private String groExpress;
private String groNewInterstitial;
private String groNewInterstitialHalf;
public String getGroExpress() {
return groExpress;
}
public void setGroExpress(String groExpress) {
this.groExpress = groExpress;
}
public String getGroNewInterstitial() {
return groNewInterstitial;
}
public void setGroNewInterstitial(String groNewInterstitial) {
this.groNewInterstitial = groNewInterstitial;
public String getGroNewInterstitialHalf() {
return groNewInterstitialHalf;
}
}
public class IterstitialHalfRate implements Serializable {
private int half;
private int full;
public int getHalf() {
return half;
}
public int getFull() {
return full;
}
}
public IterstitialHalfRate getNewnIterstitialHalfRate() {
return newnIterstitialHalfRate;
}
}
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