Commit 52c55851 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 547b76ca
......@@ -102,10 +102,15 @@ public class CsjVideoAdManager extends BaseVideoAd {
case Constant.CARRIER_HOMEWATER:// 喝水
codeId = TtCsjAdManager.TT_AD_VEDIO_DRINK;
break;
case Constant.CARRIER_WALK:// 走路
codeId = TtCsjAdManager.TT_AD_VEDIO_WALK;
break;
case Constant.CARRIER_CHALLENGE_TURN:// 大转盘
case Constant.CARRIER_DRAWCASH:// 提现
codeId = TtCsjAdManager.TT_AD_VEDIO_TURNABLE;
break;
case Constant.CARRIER_DRAWCASH:// 提现
codeId = TtCsjAdManager.TT_AD_VEDIO_DRAWCASH;
break;
case Constant.CARRIER_CHALLENGE_CARD:// 刮刮乐
codeId = TtCsjAdManager.TT_AD_VEDIO_ERASE;
break;
......@@ -121,7 +126,12 @@ public class CsjVideoAdManager extends BaseVideoAd {
case Constant.CARRIER_KUYINYUE_VEDIO:// 来电秀
codeId = TtCsjAdManager.TT_AD_VEDIO_KYLVEDIO;
break;
case Constant.CARRIER_EATMEAL_SUBSIDY:// 饭补
codeId = TtCsjAdManager.TT_AD_VEDIO_EAT;
break;
case Constant.CARRIER_HIGH_ACTIVITY:// 超级翻倍/高额任务
codeId = TtCsjAdManager.TT_AD_VEDIO_MOST;
break;
default:
codeId = TtCsjAdManager.TT_AD_VEDIO_MOREDIALOG;
break;
......
package com.mints.goldspace.ad.video;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Intent;
import android.os.SystemClock;
import com.mints.goldspace.MintsApplication;
import com.mints.goldspace.common.AppConfig;
import com.mints.goldspace.common.Constant;
import com.mints.goldspace.manager.TrackManager;
import com.mints.goldspace.manager.TtCsjAdManager;
import com.mints.goldspace.manager.YlhAdManager;
import com.mints.goldspace.mvp.presenters.YlhVideoAdPresenter;
import com.mints.goldspace.mvp.views.VideoAdManagerView;
import com.mints.goldspace.service.AppInstallService;
import com.mints.goldspace.utils.LogUtil;
import com.mints.goldspace.utils.ToastUtil;
import com.qq.e.ads.rewardvideo.RewardVideoAD;
import com.qq.e.ads.rewardvideo.RewardVideoADListener;
import com.qq.e.comm.util.AdError;
......@@ -105,41 +99,52 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView
// }
switch (carrierType) {
case Constant.CARRIER_VERSUS_VIDEO:// 每日任务视频
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_MAIN_POSTID();
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_MAIN();
break;
case Constant.CARRIER_OFFLINE_DOUBLE:// 离线收益翻倍
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_OFFINELINE_POSTID();
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_OFFINELINE();
break;
case Constant.CARRIER_SIGNIN_HOMEPAGE_CARD:// 签到翻倍
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_SIGN_POSTID();
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_SIGN();
break;
case Constant.CARRIER_WALK_BUBBLE:// 汽泡
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_MOREDIALOG_POSTID();
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_MOREDIALOG();
break;
case Constant.CARRIER_HOMEWATER:// 喝水
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_DRINK_POSTID();
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_DRINK();
break;
case Constant.CARRIER_WALK:// 走路
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_WALK();
break;
case Constant.CARRIER_CHALLENGE_TURN:// 大转盘
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_TURNABLE();
break;
case Constant.CARRIER_DRAWCASH:// 提现
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_TURNABLE_POSTID();
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_DRAWCASH();
break;
case Constant.CARRIER_CHALLENGE_CARD:// 刮刮乐
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_ERASE_POSTID();
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_ERASE();
break;
case Constant.CARRIER_BLESSINGBAG_DOUBLE:// 福袋
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_BLESSINGBAG_POSTID();
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_BLESSINGBAG();
break;
case Constant.CARRIER_HOMEVEDIO_DOUBLE:// 首页视频翻倍
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_HOMEVEDIO_POSTID();
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_HOMEVEDIO();
break;
case Constant.CARRIER_SMALLHOMEVEDIO_DOUBLE:// 短视频翻倍
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_SMALLHOMEVEDIO_POSTID();
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_SMALLHOMEVEDIO();
break;
case Constant.CARRIER_KUYINYUE_VEDIO:// 来电秀
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_KYLVEDIO_POSTID();
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_KYLVEDIO();
break;
case Constant.CARRIER_EATMEAL_SUBSIDY:// 饭补
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_EAT();
break;
case Constant.CARRIER_HIGH_ACTIVITY:// 超级翻倍/高额任务
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_MOST();
break;
default:// 在线收益翻倍
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_MOREDIALOG_POSTID();
default:
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_MOREDIALOG();
break;
}
// ToastUtil.show(MintsApplication.getContext(), "ylh vedio:" + ylhPostId);
......
......@@ -18,8 +18,8 @@ import com.mints.goldspace.common.Constant
*/
object BxmManager {
private const val APP_ID = "3b08a06c36a04eb7ad31ee31547b9e69"
private const val BUTTON_AD_SPOT_ID = "807020001003"
private const val APP_ID = ""
private const val BUTTON_AD_SPOT_ID = ""
private var bdAdvanceButtonAd: BDAdvanceButtonAd? = null
......
......@@ -13,12 +13,12 @@ import org.json.JSONObject
/**
* Cpd下载
* 圣于地Cpd下载
*/
object CpdManager {
const val BUSINESS_ID = "m8908"
const val KEY = "sywnTAWBilog6LYancoe8wQFxK070X7B"
const val BUSINESS_ID = ""
const val KEY = ""
fun getCpdUrl(): String {
val currentTimeMillis = System.currentTimeMillis().toString()
......
......@@ -23,12 +23,12 @@ public class LiebaoManager {
/**
* APP_ID
*/
public static final String APP_ID = "haozhuanqian";
public static final String APP_ID = "taojinkongjian";
/**
* APP_HOST
*/
public static final String APP_HOST = "https://haozhuanqian-xyx-big-svc.beike.cn";
public static final String APP_HOST = "https://tjkj-xyx-big-svc.beike.cn";
private static LiebaoManager _inst;
private Context context;
......@@ -95,7 +95,7 @@ public class LiebaoManager {
CmGameAppInfo.GDTAdInfo gdtAdInfo = new CmGameAppInfo.GDTAdInfo();
gdtAdInfo.setAppId(YlhAdManager.YLH_AD_APPID); // 广点通的APPID
// 游戏内广告场景;
gdtAdInfo.setRewardVideoId(YlhAdManager.INSTANCE.getYLH_AD_VEDIO_GAME_POSTID()); // 激励视频
gdtAdInfo.setRewardVideoId(YlhAdManager.INSTANCE.getYLH_AD_VEDIO_GAME()); // 激励视频
gdtAdInfo.setGameLoadInterId(YlhAdManager.INSTANCE.getYLH_AD_INTERSTITIALAD_LIEBAO());//游戏加载中的插屏
// gdtAdInfo.setBannerId(YlhAdManager.YLH_AD_BANNER_LIEBAO); // banner广告
gdtAdInfo.setPlayGameInterId(YlhAdManager.INSTANCE.getYLH_AD_INTERSTITIALAD_LIEBAO());//游戏进行中关卡插屏
......
......@@ -9,8 +9,8 @@ import com.maplehaze.adsdk.MaplehazeSDK
*/
object MhManager {
const val APP_ID = "10200"
const val POS_ID = "56834"
const val APP_ID = ""
const val POS_ID = ""
/**
* 初始化
......
......@@ -10,8 +10,8 @@ import com.xr.xrsdk.XRNewsManager
*/
object RsNewsManager {
private const val APP_ID = "19e575538d2947ad9323e6c2a70d9a7f"
private const val WX_APP_ID = "wxc8ac2985f6a805e2"
private const val APP_ID = ""
private const val WX_APP_ID = ""
/**
* 初始化
......
......@@ -13,7 +13,7 @@ import com.mints.goldspace.common.AppConfig
*/
object SceneManager {
const val SCENE_CHANNEL_Id = "10004"
const val SCENE_CHANNEL_Id = ""
/**
* 初始化
......
......@@ -21,7 +21,7 @@ public class ShumeiManager {
/**
* 应用标识,登录数美后台应用管理查看。
*/
public static final String APP_ID = "mints_goldspace";
public static final String APP_ID = "mints";
/**
* 加密 KEY。
*/
......
//package com.mints.goodmoney.manager
//
//import android.app.Application
//import android.text.TextUtils
//import com.bytedance.embedapplog.AppLog
//import com.bytedance.embedapplog.InitConfig
//import com.bytedance.embedapplog.util.UriConfig
//import com.bytedance.hume.readapk.HumeSDK
//import com.mints.goodmoney.BuildConfig
//import com.mints.goodmoney.MintsApplication
//import com.mints.library.utils.CommonUtils
//
///**
// * 描述:巨量引擎
// */
//object TouTiaoRangersManager {
//
// private const val APP_ID = "203759"
//
// /**
// * 初始化
// *
// * 只有头条分包才初始化
// */
// fun init(application: Application) {
// try {
// var channel = CommonUtils.getAppMetaData(MintsApplication.getContext(), "CHANNEL_NAME")
// if (channel.contains(ChannelManager.CHANNEL_TOUTIAO)) {
// // 穿山甲分包渠道
// val ttChannel = HumeSDK.getChannel(MintsApplication.getContext())
// if (!TextUtils.isEmpty(ttChannel)) {
// // appid和渠道,appid须保证与广告后台申请记录一致,渠道可自定义,如有多个马甲包建议设置渠道号唯一标识一个马甲包。
// val config = InitConfig(APP_ID, channel + "_" + ttChannel)
// // 域名默认国内: DEFAULT
// config.setUriConfig(UriConfig.DEFAULT);
// // 是否在控制台输出日志,可用于观察用户行为日志上报情况,建议仅在调试时使用,release版本请设置为false !
// AppLog.setEnableLog(BuildConfig.DEBUG)
// AppLog.init(application, config)
// }
// }
// } catch (e: Exception) {
// e.printStackTrace()
// }
// }
//
//}
\ No newline at end of file
......@@ -19,45 +19,47 @@ import com.mints.library.utils.CommonUtils;
*/
public class TtCsjAdManager {
public static final String TT_AD_APPID = "5113521";
public static final String TT_AD_APPID = "5038593";
public static final String TT_AD_NAME = Constant.MINTS_APP_NAME;
/*banner*/
public static String TT_AD_BANNER_MY = "945661050";// 个人中心
public static String TT_AD_BANNER_JULEYUN = "945675532";// 聚乐云
public static String TT_AD_BANNER_MY = "";// 个人中心
public static String TT_AD_BANNER_JULEYUN = "";// 聚乐云
/*激励视频*/
public static String TT_AD_VEDIO_MAIN_DEV = "945561938";// 开发使用
public static String TT_AD_VEDIO_DRINK = "945562040";//喝水打卡
public static String TT_AD_VEDIO_MAIN = "945562040";// 我的界面视频
public static String TT_AD_VEDIO_ERASE = "945562040";// 刮刮乐
public static String TT_AD_VEDIO_TURNABLE = "945562040";// 大转盘
public static String TT_AD_VEDIO_MOREDIALOG = "945562040";// 气泡
public static String TT_AD_VEDIO_SIGN = "945562040";// 签到
public static String TT_AD_VEDIO_OFFINELINE = "945562040";// 离线弹框
public static String TT_AD_VEDIO_GAME = "945562067";// 猎豹
public static String TT_AD_VEDIO_JULEYUN = "945675529";// 聚乐云
public static String TT_AD_VEDIO_BIANXIANMAO = "945743459";// 变现猫
public static String TT_AD_VEDIO_BLESSINGBAG = "945730117";// 福袋
public static String TT_AD_VEDIO_HOMEVEDIO = "945744137";// 首页视频翻倍
public static String TT_AD_VEDIO_SMALLHOMEVEDIO = "945744186";// 短视频翻倍
public static String TT_AD_VEDIO_KYLVEDIO = "945791766";// 来电秀视频
public static String TT_AD_VEDIO_MAIN_DEV = "938593319";// 开发使用
public static String TT_AD_VEDIO_DRINK = "";//喝水打卡
public static String TT_AD_VEDIO_WALK = "";//走路打卡
public static String TT_AD_VEDIO_MAIN = "";// 我的界面视频
public static String TT_AD_VEDIO_ERASE = "";// 刮刮乐
public static String TT_AD_VEDIO_TURNABLE = "";// 大转盘
public static String TT_AD_VEDIO_MOREDIALOG = "";// 气泡
public static String TT_AD_VEDIO_SIGN = "";// 签到
public static String TT_AD_VEDIO_EAT = "";// 饭补
public static String TT_AD_VEDIO_OFFINELINE = "";// 离线弹框
public static String TT_AD_VEDIO_DRAWCASH = "";// 提现
public static String TT_AD_VEDIO_MOST = "";// 超级翻倍/高额任务
public static String TT_AD_VEDIO_GAME = "";// 猎豹
public static String TT_AD_VEDIO_JULEYUN = "";// 聚乐云
public static String TT_AD_VEDIO_BIANXIANMAO = "";// 变现猫
public static String TT_AD_VEDIO_BLESSINGBAG = "";// 福袋
public static String TT_AD_VEDIO_HOMEVEDIO = "";// 首页视频翻倍
public static String TT_AD_VEDIO_SMALLHOMEVEDIO = "";// 短视频翻倍
public static String TT_AD_VEDIO_KYLVEDIO = "";// 来电秀视频
/*全屏视频*/
public static String TT_AD_FULLVEDIO_ALL = "945752969";// 通用
public static String TT_AD_FULLVEDIO_ALL = "";// 通用
/*信息流*/
public static String TT_AD_NATIVEEXPRESS_XMLY = "945700753";//喜马拉雅信息流
public static String TT_AD_NATIVEEXPRESS_AWARD = "945562047";//信息流弹窗
public static String TT_AD_NATIVEEXPRESS_WALK = "945562480";//走路
public static String TT_AD_NATIVEEXPRESS_WATER = "945562698";//喝水
public static String TT_AD_NATIVEEXPRESS_MORNINGCLOCK = "945627921";//早上打卡
public static String TT_AD_NATIVEEXPRESS_EAT = "945627922";//餐补
public static String TT_AD_NATIVEEXPRESS_ID_LIEBAO_LISTEXIT = "945562050";//猎豹列表和退出
public static String TT_AD_NATIVEEXPRESS_XMLY = "";//喜马拉雅信息流
public static String TT_AD_NATIVEEXPRESS_AWARD = "";//信息流弹窗
public static String TT_AD_NATIVEEXPRESS_WALK = "";//走路
public static String TT_AD_NATIVEEXPRESS_WATER = "";//喝水
public static String TT_AD_NATIVEEXPRESS_MORNINGCLOCK = "";//早上打卡
public static String TT_AD_NATIVEEXPRESS_EAT = "";//餐补
public static String TT_AD_NATIVEEXPRESS_ID_LIEBAO_LISTEXIT = "";//猎豹列表和退出
/*全屏广告*/
public static String TT_AD_ALLVEDIO_ID_LIEBAO = "945562481";//猎豹全屏带跳过按钮
public static String TT_AD_ALLVEDIO_ID_LIEBAO = "";//猎豹全屏带跳过按钮
/*插屏广告*/
public static String TT_AD_INSERT_LOADING_ID_LIEBAO = "945608874";//猎豹游戏加载时
public static String TT_AD_INSERT_LOADING_ID_JULEYUN = "945675533";//聚乐云
public static String TT_AD_INSERT_LOADING_ID_LIEBAO = "";//猎豹游戏加载时
public static String TT_AD_INSERT_LOADING_ID_JULEYUN = "";//聚乐云
private static boolean sInit;
......@@ -165,51 +167,6 @@ public class TtCsjAdManager {
TT_AD_VEDIO_SMALLHOMEVEDIO = "945666029";
// banner
TT_AD_BANNER_MY = "945666042";
return;
}
// 自有默认
// 信息流
TT_AD_NATIVEEXPRESS_AWARD = "945562047";
TT_AD_NATIVEEXPRESS_WALK = "945562480";
TT_AD_NATIVEEXPRESS_WATER = "945562698";
TT_AD_NATIVEEXPRESS_MORNINGCLOCK = "945627921";
TT_AD_NATIVEEXPRESS_EAT = "945627922";
// 激励视频
TT_AD_VEDIO_DRINK = "945562040";
TT_AD_VEDIO_MAIN = "945562040";
TT_AD_VEDIO_ERASE = "945562040";
TT_AD_VEDIO_TURNABLE = "945562040";
TT_AD_VEDIO_MOREDIALOG = "945562040";
TT_AD_VEDIO_OFFINELINE = "945562040";
TT_AD_VEDIO_SIGN = "945562040";
TT_AD_VEDIO_BLESSINGBAG = "945730117";
TT_AD_VEDIO_HOMEVEDIO = "945744137";
TT_AD_VEDIO_SMALLHOMEVEDIO = "945744186";
// banner
TT_AD_BANNER_MY = "945661050";
}
/**
* 分享用户代码位
*
* @param idBean
*/
private static void loadShareChannel(AdcodeBean idBean) {
if (idBean != null) {
if (!TextUtils.isEmpty(AppConfig.user_register_channel) &&
AppConfig.user_register_channel.contains("share")) {
TT_AD_VEDIO_BLESSINGBAG = idBean.getSharecsjv1();
TT_AD_VEDIO_OFFINELINE = idBean.getSharecsjv2();
TT_AD_VEDIO_SIGN = idBean.getSharecsjv3();
}
} else {
TT_AD_VEDIO_OFFINELINE = "945730111";
TT_AD_VEDIO_BLESSINGBAG = "945730117";
TT_AD_VEDIO_SIGN = "945730109";
}
}
}
......@@ -13,14 +13,17 @@ import com.tz.sdk.core.engine.IADEngineState
*/
object TzManager {
const val APP_KEY = ""
const val APP_SECRET = ""
/**
* 初始化
*/
fun initTz(application: Application) {
ADEngine.getInstance(application)
.start(ADEngineConfig.Builder(application)
.appKey("547ffff6446c5a8acd4175fb7a71a0d1")
.appSecret("1c00e59f2257bdfdd4ad9363b41621b5")
.appKey(APP_KEY)
.appSecret(APP_SECRET)
.appChannel(CommonUtils.getAppMetaData(MintsApplication.getContext(), "CHANNEL_NAME"))
// .forTest(false)
.forTest(BuildConfig.DEBUG)
......
......@@ -12,13 +12,13 @@ import com.wannuosili.sdk.WNAdSdk
*/
object WnManager {
private const val APP_ID = "10000297"
private const val APP_ID = ""
const val WN_AD_VEDIO_DRINK_POSTID = "100000532009" //喝水打卡
const val WN_AD_VEDIO_MAIN_POSTID = "100000542009" //我的界面视频
const val WN_AD_VEDIO_ERASE_POSTID = "100000552009" //刮刮乐
const val WN_AD_VEDIO_TURNABLE_POSTID = "100000562009" //大转盘
const val WN_AD_VEDIO_MOREDIALOG_POSTID = "100000572009" //签到、气泡、离线弹框
const val WN_AD_VEDIO_DRINK_POSTID = "" //喝水打卡
const val WN_AD_VEDIO_MAIN_POSTID = "" //我的界面视频
const val WN_AD_VEDIO_ERASE_POSTID = "" //刮刮乐
const val WN_AD_VEDIO_TURNABLE_POSTID = "" //大转盘
const val WN_AD_VEDIO_MOREDIALOG_POSTID = "" //签到、气泡、离线弹框
/**
* 初始化
......
......@@ -15,35 +15,34 @@ import com.qq.e.comm.managers.GDTADManager
object YlhAdManager {
/* 优量汇appid */
const val YLH_AD_APPID = "1111046903"
const val YLH_AD_APPID = "1110058445"
/* splash-postid */
var YLH_AD_SPLASH_POSTID = "7021944730189381"
/* vedio-postid */
var YLH_AD_VEDIO_DRINK_POSTID = "9001346780383626" //喝水打卡
var YLH_AD_VEDIO_MAIN_POSTID = "9001346780383626" //我的界面视频
var YLH_AD_VEDIO_ERASE_POSTID = "9001346780383626" //挑战刮刮乐
var YLH_AD_VEDIO_TURNABLE_POSTID = "9001346780383626" //大转盘
var YLH_AD_VEDIO_MOREDIALOG_POSTID = "9001346780383626" //气泡
var YLH_AD_VEDIO_SIGN_POSTID = "9001346780383626" //签到
var YLH_AD_VEDIO_OFFINELINE_POSTID = "9001346780383626" //离线弹框
var YLH_AD_VEDIO_GAME_POSTID = "9051646750686770" //猎豹游戏
var YLH_AD_VEDIO_JULEYUN_POSTID = "1011746770898338" //聚乐云
var YLH_AD_VEDIO_BLESSINGBAG_POSTID = "1081758148138388" //福袋
var YLH_AD_VEDIO_HOMEVEDIO_POSTID= "4051451341464487" // 首页视频翻倍
var YLH_AD_VEDIO_SMALLHOMEVEDIO_POSTID= "9051152341362610" // 短视频翻倍
var YLH_AD_VEDIO_KYLVEDIO_POSTID= "8001950728967276" // 来电秀视频
var YLH_AD_SPLASH_POSTID = ""
/* 激励视频 */
var YLH_AD_VEDIO_DRINK = "" //喝水打卡
var YLH_AD_VEDIO_WALK = "" //走路打卡
var YLH_AD_VEDIO_MAIN = "" // 我的界面视频
var YLH_AD_VEDIO_ERASE = "" // 刮刮乐
var YLH_AD_VEDIO_TURNABLE = "" // 大转盘
var YLH_AD_VEDIO_MOREDIALOG = "" // 气泡
var YLH_AD_VEDIO_SIGN = "" // 签到
var YLH_AD_VEDIO_EAT = "" // 饭补
var YLH_AD_VEDIO_OFFINELINE = "" // 离线弹框
var YLH_AD_VEDIO_DRAWCASH = "" // 提现
var YLH_AD_VEDIO_MOST = "" // 超级翻倍/高额任务
var YLH_AD_VEDIO_GAME = "" // 猎豹
var YLH_AD_VEDIO_BLESSINGBAG = "" // 福袋
var YLH_AD_VEDIO_HOMEVEDIO = "" // 首页视频翻倍
var YLH_AD_VEDIO_SMALLHOMEVEDIO = "" // 短视频翻倍
var YLH_AD_VEDIO_KYLVEDIO = "" // 来电秀视频
/*信息流*/
var YLH_AD_NATIVEEXPRESS_JULEYUN = "8041941770890627" //聚乐云
var YLH_AD_NATIVEEXPRESS_AWARD = "2071245901560587" //奖励弹窗
var YLH_AD_NATIVEEXPRESS_JULEYUN = "" //聚乐云
var YLH_AD_NATIVEEXPRESS_AWARD = "" //奖励弹窗
/* 插屏 */
var YLH_AD_INTERSTITIALAD_LIEBAO = "1021648750986824" //猎豹
var YLH_AD_INTERSTITIALAD_JULEYUN = "4051047730890430" //聚乐云
var YLH_AD_INTERSTITIALAD_LIEBAO = "" //猎豹
var YLH_AD_INTERSTITIALAD_JULEYUN = "" //聚乐云
/**
* 广告初始化
......@@ -62,16 +61,16 @@ object YlhAdManager {
// 开屏
YLH_AD_SPLASH_POSTID = idBean.ylhv1
// 激励视频
YLH_AD_VEDIO_DRINK_POSTID = idBean.ylhv2
YLH_AD_VEDIO_MAIN_POSTID = idBean.ylhv2
YLH_AD_VEDIO_ERASE_POSTID = idBean.ylhv2
YLH_AD_VEDIO_TURNABLE_POSTID = idBean.ylhv2
YLH_AD_VEDIO_MOREDIALOG_POSTID = idBean.ylhv2
YLH_AD_VEDIO_BLESSINGBAG_POSTID = idBean.ylhv2
YLH_AD_VEDIO_SIGN_POSTID = idBean.ylhv2
YLH_AD_VEDIO_OFFINELINE_POSTID = idBean.ylhv2
YLH_AD_VEDIO_HOMEVEDIO_POSTID = idBean.ylhv2
YLH_AD_VEDIO_SMALLHOMEVEDIO_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_DRINK_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_MAIN_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_ERASE_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_TURNABLE_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_MOREDIALOG_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_BLESSINGBAG_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_SIGN_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_OFFINELINE_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_HOMEVEDIO_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_SMALLHOMEVEDIO_POSTID = idBean.ylhv2
return
}
......@@ -89,58 +88,17 @@ object YlhAdManager {
// 开屏
YLH_AD_SPLASH_POSTID = "4031840694338658"
// 激励视频
YLH_AD_VEDIO_DRINK_POSTID = "1031552263176415"
YLH_AD_VEDIO_MAIN_POSTID = "1031552263176415"
YLH_AD_VEDIO_ERASE_POSTID = "1031552263176415"
YLH_AD_VEDIO_TURNABLE_POSTID = "1031552263176415"
YLH_AD_VEDIO_MOREDIALOG_POSTID = "1031552263176415"
YLH_AD_VEDIO_SIGN_POSTID = "1031552263176415"
YLH_AD_VEDIO_BLESSINGBAG_POSTID = "1031552263176415"
YLH_AD_VEDIO_OFFINELINE_POSTID = "1031552263176415"
YLH_AD_VEDIO_HOMEVEDIO_POSTID = "1031552263176415"
YLH_AD_VEDIO_SMALLHOMEVEDIO_POSTID = "1031552263176415"
return
// YLH_AD_VEDIO_DRINK_POSTID = "1031552263176415"
// YLH_AD_VEDIO_MAIN_POSTID = "1031552263176415"
// YLH_AD_VEDIO_ERASE_POSTID = "1031552263176415"
// YLH_AD_VEDIO_TURNABLE_POSTID = "1031552263176415"
// YLH_AD_VEDIO_MOREDIALOG_POSTID = "1031552263176415"
// YLH_AD_VEDIO_SIGN_POSTID = "1031552263176415"
// YLH_AD_VEDIO_BLESSINGBAG_POSTID = "1031552263176415"
// YLH_AD_VEDIO_OFFINELINE_POSTID = "1031552263176415"
// YLH_AD_VEDIO_HOMEVEDIO_POSTID = "1031552263176415"
// YLH_AD_VEDIO_SMALLHOMEVEDIO_POSTID = "1031552263176415"
}
// 自有默认
// 开屏
YLH_AD_SPLASH_POSTID = "7021944730189381"
// 激励视频
YLH_AD_VEDIO_DRINK_POSTID = "9001346780383626"
YLH_AD_VEDIO_MAIN_POSTID = "9001346780383626"
YLH_AD_VEDIO_ERASE_POSTID = "9001346780383626"
YLH_AD_VEDIO_TURNABLE_POSTID = "9001346780383626"
YLH_AD_VEDIO_MOREDIALOG_POSTID = "9001346780383626"
YLH_AD_VEDIO_SIGN_POSTID = "9001346780383626"
YLH_AD_VEDIO_OFFINELINE_POSTID = "9001346780383626"
YLH_AD_VEDIO_BLESSINGBAG_POSTID = "1081758148138388"
YLH_AD_VEDIO_HOMEVEDIO_POSTID = "4051451341464487"
YLH_AD_VEDIO_SMALLHOMEVEDIO_POSTID = "9051152341362610"
}
/**
* 分享用户代码位
*
* @param idBean
*/
private fun loadShareChannel(idBean: AdcodeBean?) {
if (idBean != null) {
if (!TextUtils.isEmpty(AppConfig.user_register_channel) &&
AppConfig.user_register_channel.contains("share")) {
YLH_AD_VEDIO_BLESSINGBAG_POSTID = idBean.shareylhv1
YLH_AD_VEDIO_OFFINELINE_POSTID = idBean.shareylhv2
YLH_AD_VEDIO_SIGN_POSTID = idBean.shareylhv3
}
} else {
if (!TextUtils.isEmpty(AppConfig.user_register_channel) &&
AppConfig.user_register_channel.contains("share")) {
YLH_AD_VEDIO_BLESSINGBAG_POSTID = "1081758148138388"
YLH_AD_VEDIO_SIGN_POSTID = "2091354158635490"
YLH_AD_VEDIO_OFFINELINE_POSTID = "2031954198632389"
}
}
}
}
\ No newline at end of file
......@@ -14,11 +14,11 @@ import com.mints.goldspace.MintsApplication
*/
object YwhzManager {
private const val APPID_DEBUG = "1725"
private const val APPSECRET_DEBUG = "0yzizbqwyjt104gsdukmto53qclo9ljs"
private const val APPID_DEBUG = "1066"
private const val APPSECRET_DEBUG = "nfgpxq2x1svo50m8eicv38erc9ugsx6a"
private const val APPID_RELEASE = "1726"
private const val APPSECRET_RELEASE = "g4fuod79v6e7cw4liw91iwfm5qryvz1u"
private const val APPID_RELEASE = "1050"
private const val APPSECRET_RELEASE = "ngvbamk7h3i1psj4q4cb2vzst9ts6fml"
fun init(application: Application) {
val userManager = UserManager.getInstance()
......
......@@ -10,7 +10,7 @@ import java.lang.Exception
*/
object ZhangyueManager {
private const val APPID = "10054"
private const val APPID = ""
fun onCreateIreader(application: Application) {
try {
......
......@@ -14,7 +14,6 @@ import com.mints.goldspace.ad.video.VideoAdingManager
import com.mints.goldspace.common.AppConfig
import com.mints.goldspace.common.Constant
import com.mints.goldspace.ad.express.TTPreLoadCarrierExpressManager
import com.mints.goldspace.manager.ZhangyueManager
import com.mints.goldspace.mvp.views.MainView
import com.mints.goldspace.ui.activitys.base.BaseActivity
import com.mints.goldspace.ui.fragment.*
......@@ -34,7 +33,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
private var moneyFragment: Fragment? = null
private var panFragment: Fragment? = null
// private var friendsFragment: Fragment? = null
private var friendsFragment: Fragment? = null
private var myFragment: Fragment? = null
private var channelFragment: Fragment? = null
private var kuYinyueFragment: Fragment? = null
......@@ -47,7 +46,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
override fun getContentViewLayoutID() = R.layout.activity_main
override fun initViewsAndEvents() {
ZhangyueManager.onCreateIreader(baseApplication)
// ZhangyueManager.onCreateIreader(baseApplication)
showShortVedioLayout()
......@@ -69,8 +68,8 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
tab_tv_four.text = "新闻分享"
isMainShowWz = true
} else {
tab_iv_four.setImageResource(R.drawable.tab_bell_btn)
tab_tv_four.text = "来电秀"
tab_iv_four.setImageResource(R.drawable.tab_friends_btn)
tab_tv_four.text = "平台分红"
isMainShowWz = false
}
......@@ -211,18 +210,17 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
fun clickTab4Layout() {
// 是否显示微转
AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_FOUR
if (isMainShowWz) {
AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_FOUR
if (wzFragment == null) {
wzFragment = WzFragment()
}
addOrShowFragment(supportFragmentManager, wzFragment!!, Constant.FRAGMENT_TAG_FOUR)
} else {
AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_FOUR
if (kuYinyueFragment == null) {
kuYinyueFragment = KuYinYueFragment()
if (friendsFragment == null) {
friendsFragment = FriendsFragment(true)
}
addOrShowFragment(supportFragmentManager, kuYinyueFragment!!, Constant.FRAGMENT_TAG_FOUR)
addOrShowFragment(supportFragmentManager, friendsFragment!!, Constant.FRAGMENT_TAG_FOUR)
}
......
......@@ -78,6 +78,12 @@ class FriendsFragment(private var isResume: Boolean = false) : BaseFragment(), F
friendsPresenter.attachView(this)
srl_my.setOnRefreshListener(this)
if (isResume) {
friendsLayout.visibility = View.VISIBLE
} else {
friendsLayout.visibility = View.GONE
}
initView()
initRecy()
}
......
......@@ -43,9 +43,15 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
override fun onHiddenChanged(hidden: Boolean) {
if (AppConfig.showAdFlag) {
// if (curPosition == 0) {
// mainFragment?.onHiddenChanged(hidden)
// } else if (curPosition == 3) {
// liebaoGameFragment?.onHiddenChanged(hidden)
// }
if (curPosition == 0) {
mainFragment?.onHiddenChanged(hidden)
} else if (curPosition == 3) {
} else if (curPosition == 2) {
liebaoGameFragment?.onHiddenChanged(hidden)
}
} else {
......@@ -76,11 +82,11 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
currentFragment = mainFragment
}
xtFragmentMoney.setxTabDisplayNum(4)
xtFragmentMoney.setxTabDisplayNum(3)
val newTab1 = xtFragmentMoney.newTab()
newTab1.text = "视频"
val newTab2 = xtFragmentMoney.newTab()
newTab2.text = "书城"
// val newTab2 = xtFragmentMoney.newTab()
// newTab2.text = "书城"
// val newTab3 = xtFragmentMoney.newTab()
// newTab3.text = "新闻"
val newTab4 = xtFragmentMoney.newTab()
......@@ -88,7 +94,7 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
val newTab5 = xtFragmentMoney.newTab()
newTab5.text = "游戏"
xtFragmentMoney.addTab(newTab1)
xtFragmentMoney.addTab(newTab2)
// xtFragmentMoney.addTab(newTab2)
// xtFragmentMoney.addTab(newTab3)
xtFragmentMoney.addTab(newTab4)
xtFragmentMoney.addTab(newTab5)
......@@ -187,32 +193,32 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
}
}
1 -> {
if (AppConfig.showAdFlag) {
if (bookStoreFragment == null) {
bookStoreFragment = ZhangyueFragment()
}
addOrShowFragment(childFragmentManager, bookStoreFragment!!, FRAGMENT_TAG_BOOKSTORE)
} else {
if (liebaoGameFragment == null) {
liebaoGameFragment = LiebaoGameFragment()
}
addOrShowFragment(childFragmentManager, liebaoGameFragment!!, FRAGMENT_TAG_GAME)
}
}
// 1 -> {
// if (AppConfig.showAdFlag) {
// if (bookStoreFragment == null) {
// bookStoreFragment = ZhangyueFragment()
// }
// addOrShowFragment(childFragmentManager, bookStoreFragment!!, FRAGMENT_TAG_BOOKSTORE)
// } else {
// if (liebaoGameFragment == null) {
// liebaoGameFragment = LiebaoGameFragment()
// }
// addOrShowFragment(childFragmentManager, liebaoGameFragment!!, FRAGMENT_TAG_GAME)
// }
// }
// 2 -> {
// if (newsFragment == null) {
// newsFragment = RsNewsFragment()
// }
// addOrShowFragment(childFragmentManager, newsFragment!!, FRAGMENT_TAG_NEWS)
// }
2 -> {
1 -> {
if (xmlyGameFragment == null) {
xmlyGameFragment = XmlyFragment()
}
addOrShowFragment(childFragmentManager, xmlyGameFragment!!, FRAGMENT_TAG_XMLY)
}
3 -> {
2 -> {
if (liebaoGameFragment == null) {
liebaoGameFragment = LiebaoGameFragment()
}
......
......@@ -1024,8 +1024,8 @@ class MyFragment : BaseFragment(),
}
// 聚乐云初始化
SceneManager.initScene()
SceneManager.signIn(requireActivity())
// SceneManager.initScene()
// SceneManager.signIn(requireActivity())
}
private fun initView() {
......
......@@ -5,7 +5,9 @@
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/header_layout"
<include
android:id="@+id/friendsLayout"
layout="@layout/header_layout"
android:visibility="gone"/>
<com.scwang.smartrefresh.layout.SmartRefreshLayout
......
......@@ -4,5 +4,5 @@
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Mon Feb 01 10:34:38 CST 2021
sdk.dir=/Users/Hello/Library/Android/sdk
#Fri Sep 18 20:10:31 CST 2020
sdk.dir=/Users/mcg/Library/Android/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