Commit ba248b37 authored by mengcuiguang's avatar mengcuiguang

1.2.2代码优化

parent f0a66870
......@@ -10,8 +10,8 @@ android {
applicationId "com.mints.highgold"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 12
versionName "1.1.1"
versionCode 13
versionName "1.1.2"
flavorDimensions "default"
// dex突破65535的限制
......@@ -236,11 +236,10 @@ dependencies {
// 移动安全联盟
implementation(name: 'msa_mdid_1.0.13', ext: 'aar')
// 猎豹游戏
implementation(name: 'cmgame-sdk-tt2103-1.1.8', ext: 'aar')
implementation(name: 'x5fit-1.1.8', ext: 'aar')
// implementation(name: 'cmgame-sdk-tt2203-1.2.2', ext: 'aar')
// implementation(name: 'x5fit-1.2.2', ext: 'aar')
implementation files("libs/qq_x5.jar") // x5版本:20190429_175122
implementation(name: 'cmgame-sdk-tt2203-1.2.2', ext: 'aar')
implementation(name: 'x5fit-1.2.2', ext: 'aar')
implementation(name: 'gdtfit-1.2.2', ext: 'aar')
implementation files("libs/qq_x5.jar")
// 鱼丸盒子
implementation(name: 'xzzq_ywsdk_1.0.6', ext: 'aar')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41"
......@@ -257,8 +256,6 @@ dependencies {
// implementation 'com.github.castorflex.verticalviewpager:library:19.0.1'
// implementation 'com.baidu.mobstat:mtj-sdk-circle:latest.integration'
// 一览视频
// implementation "com.yilan.sdk:ui:1.9.0.2"//修改为具体的sdk版本
// implementation "com.yilan.sdk:ad:1.9.0.2"//修改为具体的sdk版本,支持广点通、百度广告
implementation("com.yilan.sdk:ui:2.0.0.4") {
exclude group: 'com.yilan.sdk', module: 'toutiao'
exclude group: 'com.yilan.sdk', module: 'gdt'
......
......@@ -94,19 +94,24 @@ public class LiebaoManager {
// ttInfo.setGamelistExpressInteractionId("901121536"); // 模板渲染1:1,不能用于游戏tab页的入口
cmGameAppInfo.setTtInfo(ttInfo);
// // 设置热门推荐
// CmGameAppInfo.GameListAdInfo gameListAdInfo = new CmGameAppInfo.GameListAdInfo();
// // 设置热门推荐:默认为true,true:展示;false:不展示
// gameListAdInfo.setHotGameListAdShow(true);
// // 设置最新上新:默认为true,true:展示;false:不展示
// gameListAdInfo.setNewGameListAdShow(true);
// // 设置更多好玩:默认为true,true:展示;false:不展示
// gameListAdInfo.setMoreGameListAdShow(true);
// // 设置更多好玩广告展示间隔行数:默认为间隔4行展示一个广告
// gameListAdInfo.setMoreGameListAdInternal(4);
// cmGameAppInfo.setGameListAdInfo(gameListAdInfo);
// 开启游戏挑战和福利功能,默认不开启
// 需要支持广点通广告时,才需下面代码
// 【设置广点通广告id】
CmGameAppInfo.GDTAdInfo gdtAdInfo = new CmGameAppInfo.GDTAdInfo();
gdtAdInfo.setAppId(YlhAdManager.YLH_AD_VEDIO_APPID); // 广点通的APPID
// 游戏内广告场景;
gdtAdInfo.setRewardVideoId(YlhAdManager.YLH_AD_VEDIO_GAME_POSTID); // 激励视频
cmGameAppInfo.setGdtAdInfo(gdtAdInfo);
// 【设置广点通和穿山甲广告占比】
// 概率设置规则,如下:
// 0: 全部使用穿山甲广告
// 100: 全部采用广点通广告
// 40:则是穿山甲广告命中概率是60%,广点通是40%,如果一方没广告,则用另一方补量。
cmGameAppInfo.setRewardAdProbability(40); // 默认值为0,全部采用穿山甲激励视频广告
// 功能默认开启,可使用如下方法来关闭
// cmGameAppInfo.setShowLogin(false);
// 开启游戏挑战和福利功能,默认开启
try {
cmGameAppInfo.setRewarded(spUtil.getBoolean(Constant.LIEBAO_GAME_GIFT, false));
} catch (Exception e) {
......
......@@ -15,6 +15,7 @@ public class YlhAdManager {
public static final String YLH_AD_VEDIO_MAIN_PAN_POSTID = "5071107856089058";//首页大转盘
public static final String YLH_AD_VEDIO_VERSUS_PAN_POSTID = "2011506866980034";//挑战大转盘
public static final String YLH_AD_VEDIO_VERSUS_ERASE_POSTID = "6031208866083065";//挑战刮刮乐
public static final String YLH_AD_VEDIO_GAME_POSTID = "7011114415121322";//猎豹游戏
/* 插屏 */
public static final String YLH_AD_INTERSTITIALAD_DRAWCAH = "4021600917420124";//提现
......
......@@ -28,6 +28,7 @@ import com.mints.highgold.mvp.presenters.GamePresenter;
import com.mints.highgold.mvp.views.GameView;
import com.mints.highgold.ui.activitys.AwardActivity;
import com.mints.highgold.ui.fragment.base.BaseFragment;
import com.mints.highgold.utils.LogUtil;
import com.mints.highgold.utils.SpanUtils;
import com.mints.library.utils.json.JsonUtil;
......@@ -272,7 +273,7 @@ public class GameFragment extends BaseFragment
vo.put("pkg", Constant.MINTS_PKG_NAME);
gamePresenter.gameAdd(STASTICIS_GAME_URL, eventTypeClick, vo);
Log.d(TAG, "cmgamesdk_gameF_gameClickCallback_默认游戏中心页面,点击游戏试,触发回调----" + gameID + "----" + gameName);
LogUtil.d(TAG, "cmgamesdk_gameF_gameClickCallback_默认游戏中心页面,点击游戏试,触发回调----" + gameID + "----" + gameName);
// }
}
......@@ -308,7 +309,7 @@ public class GameFragment extends BaseFragment
}
Log.d(TAG, "cmgamesdk_gameF_gamePlayTimeCallback—gamefragment_点击游戏右上角或物理返回键,退出游戏时触发回调,并返回游戏时长----" + "play game :" + gameID + "playTimeInSeconds : " + playTimeInSeconds);
LogUtil.d(TAG, "cmgamesdk_gameF_gamePlayTimeCallback—gamefragment_点击游戏右上角或物理返回键,退出游戏时触发回调,并返回游戏时长----" + "play game :" + gameID + "playTimeInSeconds : " + playTimeInSeconds);
// }
}
......@@ -321,11 +322,12 @@ public class GameFragment extends BaseFragment
* 10:游戏列表模板插屏广告;11:游戏加载模板插屏广告;12:游戏列表信息流模板渲染广告;
* 13:游戏退出推荐弹框信息流自渲染广告;14:游戏退出推荐弹框信息流模板渲染广告
* @param adAction 广告操作:1:曝光;2:点击;3:关闭;4:跳过
* @param adChannel 广告源:穿山甲,优量汇
*/
@Override
public void onGameAdAction(String gameId, int adType, int adAction) {
public void onGameAdAction(String gameId, int adType, int adAction, String adChannel) {
// if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_GAME) {
Log.d(TAG, "cmgamesdk_gameF_onGameAdAction_广告曝光/点击回调----" + "onGameAdAction gameID: " + gameID + " adType: " + adType + " adAction: " + adAction);
LogUtil.d(TAG, "cmgamesdk_gameF_onGameAdAction_广告曝光/点击回调----" + "onGameAdAction gameID: " + gameID + " adType: " + adType + " adAction: " + adAction+ " adChannel: " + adChannel);
if (userConfig != null) {
if (adAction != 1) {
HashMap<String, Object> vo = new HashMap<>();
......@@ -349,6 +351,7 @@ public class GameFragment extends BaseFragment
break;
}
vo.put("adType", adType);
vo.put("adsource", adChannel);
vo.put("eventType", eventTypeView);
vo.put("pkg", Constant.MINTS_PKG_NAME);
gamePresenter.gameAdd(STASTICIS_GAME_URL, Constant.EVENT_TYPE_ADCLICK, vo);
......@@ -366,17 +369,6 @@ public class GameFragment extends BaseFragment
*/
@Override
public void onGameAccount(String loginInfo) {
// if (!TextUtils.isEmpty(loginInfo)) {
// // 保存用户游戏信息到本地
// spUtil.putString(Constant.LIEBAO_GAME_INFO, loginInfo);
//
// if (userManager.userIsLogin()) {
// gamePresenter.editUserMsg(loginInfo);
// }
// }
// if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_GAME) {
Log.d(TAG, "cmgamesdk_gameF_onGameAccount_账号信息变化时触发回调,若需要支持APP卸载后游戏信息不丢失,需要注册该回调----" + "onGameAccount loginInfo: " + loginInfo);
// }
}
/**
......@@ -394,7 +386,7 @@ public class GameFragment extends BaseFragment
vo.put("pkg", Constant.MINTS_PKG_NAME);
gamePresenter.gameAdd(AIP_GAME_URL, Constant.EVENT_TYPE_GAMEINFO, vo);
Log.d(TAG, "cmgamesdk_gameF_gameExitInfoCallback_返回游戏数据(json格式),如:每玩一关,返回关卡数----" + "gameExitInfoCallback: " + gameExitInfo);
LogUtil.d(TAG, "cmgamesdk_gameF_gameExitInfoCallback_返回游戏数据(json格式),如:每玩一关,返回关卡数----" + "gameExitInfoCallback: " + gameExitInfo);
// }
}
......@@ -403,9 +395,6 @@ public class GameFragment extends BaseFragment
*/
@Override
public void gameStateCallback(int nState) {
// if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_GAME) {
Log.d(TAG, "cmgamesdk_gameF_gameStateCallback_游戏界面的状态信息回调----" + "gameStateCallback: " + nState);
// }
}
/**
......@@ -413,8 +402,5 @@ public class GameFragment extends BaseFragment
*/
@Override
public void onGameListReady() {
// if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_GAME) {
Log.d(TAG, "cmgamesdk_gameF_onGameListReady_游戏列表渲染完成的回调----" + "onGameListReady");
// }
}
}
......@@ -872,9 +872,10 @@ public class MainFragment extends BaseFragment
* 10:游戏列表模板插屏广告;11:游戏加载模板插屏广告;12:游戏列表信息流模板渲染广告;
* 13:游戏退出推荐弹框信息流自渲染广告;14:游戏退出推荐弹框信息流模板渲染广告
* @param adAction 广告操作:1:曝光;2:点击;3:关闭;4:跳过
* @param adChannel 广告源:穿山甲,优量汇
*/
@Override
public void onGameAdAction(String gameId, int adType, int adAction) {
public void onGameAdAction(String gameId, int adType, int adAction, String adChannel) {
// if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_LOAN) {
if (userConfig != null) {
if (adAction != 1) {
......@@ -899,6 +900,7 @@ public class MainFragment extends BaseFragment
break;
}
vo.put("adType", adType);
vo.put("adsource", adChannel);
vo.put("eventType", eventTypeView);
vo.put("pkg", Constant.MINTS_PKG_NAME);
loanPresenter.gameAdd(STASTICIS_GAME_URL, Constant.EVENT_TYPE_ADCLICK, 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