Commit 8900563b authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 4dbd973c
...@@ -12,6 +12,7 @@ import androidx.multidex.MultiDexApplication; ...@@ -12,6 +12,7 @@ import androidx.multidex.MultiDexApplication;
import com.hjq.toast.ToastUtils; import com.hjq.toast.ToastUtils;
import com.mints.goodmoney.common.Constant; import com.mints.goodmoney.common.Constant;
import com.mints.goodmoney.manager.CsjGroMoreManager;
import com.mints.goodmoney.manager.KsManager; import com.mints.goodmoney.manager.KsManager;
import com.mints.goodmoney.manager.LiebaoManager; import com.mints.goodmoney.manager.LiebaoManager;
import com.mints.goodmoney.manager.MhManager; import com.mints.goodmoney.manager.MhManager;
...@@ -128,6 +129,9 @@ public class MintsApplication extends MultiDexApplication { ...@@ -128,6 +129,9 @@ public class MintsApplication extends MultiDexApplication {
// 穿山甲 // 穿山甲
TtCsjAdManager.init(this); TtCsjAdManager.init(this);
// GroMore
CsjGroMoreManager.INSTANCE.init();
// 快手 // 快手
KsManager.INSTANCE.initKs(this); KsManager.INSTANCE.initKs(this);
......
...@@ -148,6 +148,7 @@ object Constant { ...@@ -148,6 +148,7 @@ object Constant {
const val AD_SOURCE_CSJ = "CSJ" const val AD_SOURCE_CSJ = "CSJ"
const val AD_SOURCE_GROMORE = "GROMORE"
const val AD_SOURCE_YLH = "YLH" const val AD_SOURCE_YLH = "YLH"
const val AD_SOURCE_SDHZ = "SDHZ" //闪电盒子 const val AD_SOURCE_SDHZ = "SDHZ" //闪电盒子
const val AD_SOURCE_FL = "FL" //枫岚 const val AD_SOURCE_FL = "FL" //枫岚
......
...@@ -8,6 +8,8 @@ import com.bytedance.msdk.api.TTAdConfig; ...@@ -8,6 +8,8 @@ import com.bytedance.msdk.api.TTAdConfig;
import com.bytedance.msdk.api.TTAdConstant; import com.bytedance.msdk.api.TTAdConstant;
import com.bytedance.msdk.api.TTMediationAdSdk; import com.bytedance.msdk.api.TTMediationAdSdk;
import com.bytedance.msdk.api.UserInfoForSegment; import com.bytedance.msdk.api.UserInfoForSegment;
import com.mints.goodmoney.BuildConfig;
import com.mints.goodmoney.common.Constant;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
...@@ -18,6 +20,9 @@ import java.util.Map; ...@@ -18,6 +20,9 @@ import java.util.Map;
*/ */
public class TTGroMoreAdManagerHolder { public class TTGroMoreAdManagerHolder {
public static final String TT_AD_APPID = "5113521";
public static final String TT_AD_NAME = Constant.MINTS_APP_NAME;
private static boolean sInit; private static boolean sInit;
public static void init(Context context) { public static void init(Context context) {
...@@ -51,12 +56,12 @@ public class TTGroMoreAdManagerHolder { ...@@ -51,12 +56,12 @@ public class TTGroMoreAdManagerHolder {
customInfos.put("bbbb", "test222"); customInfos.put("bbbb", "test222");
userInfo.setCustomInfos(customInfos); userInfo.setCustomInfos(customInfos);
return new TTAdConfig.Builder() return new TTAdConfig.Builder()
.appId("5001121") //必填 ,不能为空 .appId(TT_AD_APPID) //必填 ,不能为空
.appName("APP测试媒体") //必填,不能为空 .appName(TT_AD_NAME) //必填,不能为空
.openAdnTest(false)//开启第三方ADN测试时需要设置为true,会每次重新拉去最新配置,release 包情况下必须关闭.默认false .openAdnTest(false)//开启第三方ADN测试时需要设置为true,会每次重新拉去最新配置,release 包情况下必须关闭.默认false
.isPanglePaid(false)//是否为费用户 .isPanglePaid(false)//是否为费用户
.setPublisherDid(getAndroidId(context)) //用户自定义device_id .setPublisherDid(getAndroidId(context)) //用户自定义device_id
.openDebugLog(true) //测试阶段打开,可以通过日志排查问题,上线时去除该调用 .openDebugLog(BuildConfig.DEBUG) //测试阶段打开,可以通过日志排查问题,上线时去除该调用
.usePangleTextureView(true) //使用TextureView控件播放视频,默认为SurfaceView,当有SurfaceView冲突的场景,可以使用TextureView .usePangleTextureView(true) //使用TextureView控件播放视频,默认为SurfaceView,当有SurfaceView冲突的场景,可以使用TextureView
.setPangleTitleBarTheme(TTAdConstant.TITLE_BAR_THEME_DARK) .setPangleTitleBarTheme(TTAdConstant.TITLE_BAR_THEME_DARK)
.allowPangleShowNotify(true) //是否允许sdk展示通知栏提示 .allowPangleShowNotify(true) //是否允许sdk展示通知栏提示
......
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