Commit 5623c54f authored by mengcuiguang's avatar mengcuiguang

解决冲突

parents 99b6b840 96064363
...@@ -259,9 +259,9 @@ dependencies { ...@@ -259,9 +259,9 @@ dependencies {
implementation(name: 'xrsdk-release_tbs', ext: 'aar') implementation(name: 'xrsdk-release_tbs', ext: 'aar')
implementation(name: 'xrsharesdk-release_tbs', ext: 'aar') implementation(name: 'xrsharesdk-release_tbs', ext: 'aar')
implementation(name: 'windAd-2.25.0', ext: 'aar') implementation(name: 'windAd-2.25.0', ext: 'aar')
implementation 'com.scwang.smart:refresh-layout-kernel:2.0.3' implementation 'com.scwang.smart:refresh-layout-kernel:2.0.3'
implementation 'com.scwang.smart:refresh-header-classics:2.0.3' implementation 'com.scwang.smart:refresh-header-classics:2.0.3'
implementation 'com.scwang.smart:refresh-footer-classics:2.0.3' implementation 'com.scwang.smart:refresh-footer-classics:2.0.3'
// 枫岚 // 枫岚
implementation(name: 'mh-adsdk', ext: 'aar') implementation(name: 'mh-adsdk', ext: 'aar')
implementation(name: 'mh-adsdk-ext', ext: 'aar') implementation(name: 'mh-adsdk-ext', ext: 'aar')
...@@ -321,7 +321,7 @@ dependencies { ...@@ -321,7 +321,7 @@ dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$rootProject.coroutinesVersion" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$rootProject.coroutinesVersion"
implementation "com.google.dagger:hilt-android:$rootProject.hiltVersion" implementation "com.google.dagger:hilt-android:$rootProject.hiltVersion"
implementation "androidx.hilt:hilt-lifecycle-viewmodel:$rootProject.hiltViewModelVersion" implementation "androidx.hilt:hilt-lifecycle-viewmodel:$rootProject.hiltViewModelVersion"
implementation "com.scwang.smart:refresh-header-material:$rootProject.refresh_version" implementation "com.scwang.smart:refresh-header-material:$rootProject.refresh_version"
implementation 'com.github.pdog18:dimension-extensions:1.0' implementation 'com.github.pdog18:dimension-extensions:1.0'
implementation 'com.github.zhpanvip:BannerViewPager:3.2.0' implementation 'com.github.zhpanvip:BannerViewPager:3.2.0'
api "androidx.navigation:navigation-fragment-ktx:$navigationVersion" api "androidx.navigation:navigation-fragment-ktx:$navigationVersion"
...@@ -341,8 +341,8 @@ dependencies { ...@@ -341,8 +341,8 @@ dependencies {
implementation 'com.sensorsdata.analytics.android:SensorsAnalyticsSDK:4.4.3' implementation 'com.sensorsdata.analytics.android:SensorsAnalyticsSDK:4.4.3'
api 'org.aspectj:aspectjrt:1.9.5' api 'org.aspectj:aspectjrt:1.9.5'
//小满 //小满
implementation ("com.bx:adsdk:1.4.2.2"){ implementation("com.bx:adsdk:1.4.2.2") {
exclude group:"com.miit.sdk" exclude group: "com.miit.sdk"
transitive = true transitive = true
changing = true changing = true
} }
......
package com.mints.goodmoney.ad.express package com.mints.goodmoney.ad.express
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.DialogInterface
import android.text.TextUtils import android.text.TextUtils
import android.util.Log import android.util.Log
import android.view.LayoutInflater import android.view.LayoutInflater
...@@ -95,7 +96,7 @@ object KsPreLoadExpressManager { ...@@ -95,7 +96,7 @@ object KsPreLoadExpressManager {
} }
override fun onVideoPlayError(what: Int, extra: Int) { override fun onVideoPlayError(what: Int, extra: Int) {
LogUtil.d("KsPreLoadExpressManager","id=${what} extra=${extra}") LogUtil.d("KsPreLoadExpressManager", "id=${what} extra=${extra}")
} }
}) })
...@@ -191,6 +192,10 @@ object KsPreLoadExpressManager { ...@@ -191,6 +192,10 @@ object KsPreLoadExpressManager {
// Toast.makeText(mContext, "广告" + ad.appName + "展示", Toast.LENGTH_SHORT).show() // Toast.makeText(mContext, "广告" + ad.appName + "展示", Toast.LENGTH_SHORT).show()
} }
} }
override fun handleDownloadDialog(p0: DialogInterface.OnClickListener?): Boolean {
return false
}
}) })
// 广告描述 // 广告描述
......
...@@ -120,6 +120,8 @@ class KsVideoAdManager private constructor(activity: Activity) : ...@@ -120,6 +120,8 @@ class KsVideoAdManager private constructor(activity: Activity) :
} }
} }
override fun onRequestResult(p0: Int) {}
}) })
......
...@@ -6,8 +6,6 @@ import android.content.Context; ...@@ -6,8 +6,6 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.text.TextUtils; import android.text.TextUtils;
import com.mints.goodmoney.MintsApplication;
import com.mints.goodmoney.ad.video.base.VideoAdStatusListener; import com.mints.goodmoney.ad.video.base.VideoAdStatusListener;
import com.mints.goodmoney.common.AppConfig; import com.mints.goodmoney.common.AppConfig;
import com.mints.goodmoney.common.Constant; import com.mints.goodmoney.common.Constant;
...@@ -17,8 +15,6 @@ import com.mints.goodmoney.mvp.model.WeightBean; ...@@ -17,8 +15,6 @@ import com.mints.goodmoney.mvp.model.WeightBean;
import com.mints.goodmoney.service.AppInstallService; import com.mints.goodmoney.service.AppInstallService;
import com.mints.goodmoney.utils.AppUtil; import com.mints.goodmoney.utils.AppUtil;
import com.mints.goodmoney.utils.LogUtil; import com.mints.goodmoney.utils.LogUtil;
import com.mints.goodmoney.utils.ToastUtil;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
...@@ -64,8 +60,6 @@ public class VideoAdingManager { ...@@ -64,8 +60,6 @@ public class VideoAdingManager {
// 是否是高额视频任务 // 是否是高额视频任务
private boolean isHighWeight = false; private boolean isHighWeight = false;
private boolean isTTVideoAd = false;
private int highIndex = 0;//0-穿山甲 1-优量汇 2-快手
private Activity activity; private Activity activity;
private boolean isVideoAdDownload = false;// 是否点击广告下载 true-点击 private boolean isVideoAdDownload = false;// 是否点击广告下载 true-点击
...@@ -235,31 +229,52 @@ public class VideoAdingManager { ...@@ -235,31 +229,52 @@ public class VideoAdingManager {
/** /**
* 高额任务广告类型 * 高额任务广告类型
* *
* @return _ * @return
*/ */
private String getHighWeight() { public String getHighWeight() {
// isTTVideoAd = !isTTVideoAd;
// if (isTTVideoAd) { int weight = 0;
// return Constant.CSJ_VEDIO_AD;
// } else { if (weightList != null) {
// return Constant.YLH_VEDIO_AD; weightList.clear();
// }
String adType = "";
switch (highIndex) {
case 0:
highIndex = 1;
adType = Constant.CSJ_VEDIO_AD;
break;
case 1:
highIndex = 2;
adType = Constant.YLH_VEDIO_AD;
break;
case 2:
highIndex = 0;
adType = Constant.KS_VEDIO_AD;
break;
} }
return adType;
// 穿山甲
if (AppConfig.csjHighVideoAdCount > 0) {
weightList.add(new WeightBean(AppConfig.csjHighVideoAdCount, Constant.CSJ_VEDIO_AD));
weight = weight + AppConfig.csjHighVideoAdCount;
LogUtil.d(TAG, "高额任务 -> 权重值:csjVideoWeight:" + AppConfig.csjHighVideoAdCount);
}
// 优量汇
if (AppConfig.ylhHighVideoAdCount > 0) {
weightList.add(new WeightBean(AppConfig.ylhHighVideoAdCount, Constant.YLH_VEDIO_AD));
weight = weight + AppConfig.ylhHighVideoAdCount;
LogUtil.d(TAG, "高额任务 -> 权重值:ylhVideoWeight:" + AppConfig.ylhHighVideoAdCount);
}
// 快手
if (AppConfig.ksHighVideoAdCount > 0) {
weightList.add(new WeightBean(AppConfig.ksHighVideoAdCount, Constant.KS_VEDIO_AD));
weight = weight + AppConfig.ksHighVideoAdCount;
LogUtil.d(TAG, "高额任务 -> 权重值:ksVideoWeight:" + AppConfig.ksHighVideoAdCount);
}
// 权重随机
if (weightList != null && weightList.size() > 0 && weight > 0) {
LogUtil.d(TAG, "高额任务 -> 1、权重总值:" + weight);
Random r = new Random();
int randomWeight = r.nextInt(weight) + 1;
LogUtil.d(TAG, "高额任务 -> 2、权重随机值:" + randomWeight);
for (WeightBean weightBean : weightList) {
randomWeight -= weightBean.getWeight();
if (randomWeight <= 0) {
LogUtil.d(TAG, "高额任务 -> 3、权重结果:" + weightBean.getType());
return weightBean.getType();
}
}
}
return Constant.CSJ_VEDIO_AD;
} }
/** /**
......
...@@ -100,6 +100,20 @@ public class AppConfig { ...@@ -100,6 +100,20 @@ public class AppConfig {
* rtaVideo 剩余广告播放数 * rtaVideo 剩余广告播放数
*/ */
public static int rtaVideoAdCount = 0; public static int rtaVideoAdCount = 0;
/**
* 高额任务和超级翻倍 csjVideo 剩余广告播放数
*/
public static int csjHighVideoAdCount = 0;
/**
* 高额任务和超级翻倍 ylhVideo 剩余广告播放数
*/
public static int ylhHighVideoAdCount = 0;
/**
* 高额任务和超级翻倍 ksVideo 剩余广告播放数
*/
public static int ksHighVideoAdCount = 0;
/** /**
* 高额试玩任务标识 * 高额试玩任务标识
......
...@@ -23,6 +23,9 @@ object KsManager { ...@@ -23,6 +23,9 @@ object KsManager {
/* vedio-postid */ /* vedio-postid */
const val KS_AD_VEDIO_POSTID = 5746000022 const val KS_AD_VEDIO_POSTID = 5746000022
/* 内容联盟id */
const val KS_CONTENT_POSTID = 5746000049
/** /**
* 初始化 * 初始化
*/ */
......
...@@ -13,6 +13,7 @@ public class UserTaskMsgBean implements Serializable { ...@@ -13,6 +13,7 @@ public class UserTaskMsgBean implements Serializable {
private UserRiskAppsBean userRiskApps; private UserRiskAppsBean userRiskApps;
private AdcodeBean adcode_v1 = null; private AdcodeBean adcode_v1 = null;
private FlowAdRulesBean flowAdRules; private FlowAdRulesBean flowAdRules;
private HighRatePlanBean highRatePlan;
private String ip; private String ip;
private String channel; private String channel;
...@@ -135,4 +136,30 @@ public class UserTaskMsgBean implements Serializable { ...@@ -135,4 +136,30 @@ public class UserTaskMsgBean implements Serializable {
public FlowAdRulesBean getFlowAdRules() { public FlowAdRulesBean getFlowAdRules() {
return flowAdRules; return flowAdRules;
} }
public HighRatePlanBean getHighRatePlan() {
return highRatePlan;
}
public void setHighRatePlan(HighRatePlanBean highRatePlan) {
this.highRatePlan = highRatePlan;
}
public static class HighRatePlanBean implements Serializable {
private int YLH;
private int KS;
private int CSJ;
public int getYLH() {
return YLH;
}
public int getKS() {
return KS;
}
public int getCSJ() {
return CSJ;
}
}
} }
...@@ -425,6 +425,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener { ...@@ -425,6 +425,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
// 是否开启应用使用情况权限 // 是否开启应用使用情况权限
if (AppUtil.isOpenUsageStats()) { if (AppUtil.isOpenUsageStats()) {
registerBroad() registerBroad()
videoAdingManager.setIsHighWeight(true)
awardVideo() awardVideo()
} else { } else {
AppTryPlayManager.openAppUsageStats(this) AppTryPlayManager.openAppUsageStats(this)
......
...@@ -29,6 +29,7 @@ class SplashKsADActivity : BaseActivity() { ...@@ -29,6 +29,7 @@ class SplashKsADActivity : BaseActivity() {
* 记录拉取广告的时间 * 记录拉取广告的时间
*/ */
private val handler = Handler(Looper.getMainLooper()) private val handler = Handler(Looper.getMainLooper())
override fun getContentViewLayoutID(): Int { override fun getContentViewLayoutID(): Int {
return R.layout.activity_splash_ylh return R.layout.activity_splash_ylh
} }
...@@ -100,6 +101,8 @@ class SplashKsADActivity : BaseActivity() { ...@@ -100,6 +101,8 @@ class SplashKsADActivity : BaseActivity() {
next() next()
} }
override fun onRequestResult(p0: Int) {}
override fun onSplashScreenAdLoad(p0: KsSplashScreenAd?) { override fun onSplashScreenAdLoad(p0: KsSplashScreenAd?) {
LogUtil.d(TAG, "onSplashScreenAdLoad") LogUtil.d(TAG, "onSplashScreenAdLoad")
......
...@@ -324,6 +324,13 @@ class MyFragment : BaseFragment(), ...@@ -324,6 +324,13 @@ class MyFragment : BaseFragment(),
return return
} }
// 高额任务及超级翻倍次数
if (data.highRatePlan != null) {
AppConfig.csjHighVideoAdCount = data.highRatePlan.csj
AppConfig.ylhHighVideoAdCount = data.highRatePlan.ylh
AppConfig.ksHighVideoAdCount = data.highRatePlan.ks
}
if (data.shareNews != null) { if (data.shareNews != null) {
AppConfig.wzReadCoin = data.shareNews.readCoin AppConfig.wzReadCoin = data.shareNews.readCoin
} }
......
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