Commit afbae991 authored by mengcuiguang's avatar mengcuiguang

上传设备信息添加ua字段

parent e385dc3c
......@@ -50,9 +50,9 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
private TTRewardAd mttRewardAd;
Activity activity;
private Activity activity;
private String adUnitId="946018378";
private String adUnitId="946018378"; //代码位
private boolean isClickScreen = true; // 是否点击屏幕跳转广告
......@@ -164,6 +164,11 @@ public class CsjGroMoreVideoAdManager extends BaseVideoAd {
//该方法直接展示广告
//展示广告,并传入广告展示的场景
mttRewardAd.showRewardAd(activity, mTTRewardedAdListener);
Log.e(TAG, "adNetworkPlatformId: " + mttRewardAd.getAdNetworkPlatformId()); //获取展示广告对应的adn的值 具体值见NetworkPlatformConst类 -3: 无权限 -2: 暂无数据
Log.e(TAG, "adNetworkRitId:" + mttRewardAd.getAdNetworkRitId()); //获取展示广告对应的代码位 具体值见NetworkPlatformConst类 "-3": 无权限 "-2"
Log.e(TAG, "preEcpm: " + mttRewardAd.getPreEcpm()); //获取展示广告预估ecpm价格,单位是分 具体值见NetworkPlatformConst类 "-3": 无权限 "-2": 暂无数据 "-1":平台未有填写的预估ecpm价格
} else {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_GROMORE, Constant.EVENT_TYPE_ONE, "999999", "Cached Fail");
......
......@@ -43,6 +43,7 @@ public class VideoAdingManager {
private CsjFullVideoAdManager csjFullVideoAdManager;
private KsVideoAdManager ksVideoAdManager;
private RTAVideoAdManager rtaVideoAdManager;
private CsjGroMoreVideoAdManager csjGroMoreVideoAdManager;
private int wnWeight;
private int ylhWeight;
......@@ -52,6 +53,7 @@ public class VideoAdingManager {
private int csjFullVideoWeight;
private int ksVideoWeight;
private int rtaVideoWeight;
private int groMoreWeight;
private ArrayList<WeightBean> weightList;
......@@ -91,6 +93,7 @@ public class VideoAdingManager {
shVideoAdManager = ShVideoAdManager.Companion.getInstance(activity);
ksVideoAdManager = KsVideoAdManager.Companion.getInstance(activity);
rtaVideoAdManager = RTAVideoAdManager.Companion.getInstance(activity);
csjGroMoreVideoAdManager = CsjGroMoreVideoAdManager.getInstance(activity);
weightList = new ArrayList<>();
}
......@@ -136,7 +139,7 @@ public class VideoAdingManager {
public void initAdWeight(int csjVideoWeight, int ylhWeight,
int wnWeight, int flVideoWeight,
int shVideoWeight, int csjFullVideoWeight,
int ksVideoWeight, int rtaVideoWeight) {
int ksVideoWeight, int rtaVideoWeight, int groMoreWeight) {
this.csjVideoWeight = csjVideoWeight;
this.ylhWeight = ylhWeight;
this.wnWeight = wnWeight;
......@@ -145,6 +148,7 @@ public class VideoAdingManager {
this.csjFullVideoWeight = csjFullVideoWeight;
this.ksVideoWeight = ksVideoWeight;
this.rtaVideoWeight = rtaVideoWeight;
this.groMoreWeight = groMoreWeight;
}
/**
......@@ -388,6 +392,7 @@ public class VideoAdingManager {
int tzVideoAdCount = AppConfig.shVideoAdCount;
int ksVideoAdCount = AppConfig.ksVideoAdCount;
int csjFullVideoAdCount = AppConfig.csjFullVideoAdCount;
int groMoreVideoAdCount = AppConfig.groMoreVideoAdCount;
if (ylhAdCount <= 0 &&
csjVideoAdCount <= 0 &&
......@@ -395,6 +400,7 @@ public class VideoAdingManager {
flVideoAdCount <= 0 &&
tzVideoAdCount <= 0 &&
csjFullVideoAdCount <= 0 &&
groMoreVideoAdCount <= 0 &&
ksVideoAdCount <= 0) {
// showToast("今日视频已看完,请明天再来吧");
return true;
......@@ -446,6 +452,11 @@ public class VideoAdingManager {
rtaVideoAdManager.onDestroy();
rtaVideoAdManager = null;
}
if (csjGroMoreVideoAdManager != null) {
csjGroMoreVideoAdManager.setVideoAdStatusListener(null);
csjGroMoreVideoAdManager.onDestroy();
csjGroMoreVideoAdManager = null;
}
if (mReceiverBroadcastReceiver != null) {
activity.stopService(new Intent(activity, AppInstallService.class));
......@@ -797,6 +808,43 @@ public class VideoAdingManager {
});
rtaVideoAdManager.loadAd(activity, bean.getCurCoin(), bean.getCarrierType(), bean.getExtraId());
}else if (TextUtils.equals(videoAdType, Constant.GROMORE_VEDIO_AD)) {
// GROMORE广告激励视频
if (csjGroMoreVideoAdManager == null) {
if (activity == null) {
if (videoAdingListener != null) {
videoAdingListener.videoAdingListenerError(Constant.GROMORE_VEDIO_AD);
}
return;
}
csjGroMoreVideoAdManager = CsjGroMoreVideoAdManager.getInstance(activity);
}
csjGroMoreVideoAdManager.setVideoAdStatusListener(new VideoAdStatusListener() {
@Override
public void adSuccess() {
AppConfig.groMoreVideoAdCount--;
if (videoAdingListener != null) {
videoAdingListener.videoAdingListenerSuccess(Constant.GROMORE_VEDIO_AD);
}
}
@Override
public void adFail() {
if (videoAdingListener != null) {
videoAdingListener.videoAdingListenerFail(Constant.GROMORE_VEDIO_AD);
}
}
@Override
public void adDownload() {
isVideoAdDownload = true;
// 注册下载任务监听
registerBroad();
}
});
csjGroMoreVideoAdManager.loadAd(activity, bean.getCurCoin(), bean.getCarrierType(), bean.getExtraId());
}
} catch (Exception e) {
e.printStackTrace();
......
......@@ -100,6 +100,10 @@ public class AppConfig {
* rtaVideo 剩余广告播放数
*/
public static int rtaVideoAdCount = 0;
/**
* gromore 剩余广告播放数
*/
public static int groMoreVideoAdCount = 0;
/**
* 高额任务和超级翻倍 csjVideo 剩余广告播放数
*/
......
......@@ -178,6 +178,7 @@ object Constant {
const val SH_VEDIO_AD = "SH_VEDIO_AD"
const val KS_VEDIO_AD = "KS_VEDIO_AD"
const val RTA_VEDIO_AD = "RTA_VEDIO_AD"
const val GROMORE_VEDIO_AD = "GROMORE_VEDIO_AD"
// 信息流广告类型
const val CSJ_EXPRESS_AD = "CSJ_EXPRESS_AD"
......
......@@ -181,11 +181,11 @@ class DeviceInfo private constructor() {
return imei
}
val userAgent: String?
val userAgent: String
get() {
var userAgent: String? = ""
var userAgent: String = ""
try {
userAgent = System.getProperty("http.agent")
userAgent = System.getProperty("http.agent").toString()
} catch (e: Exception) {
e.printStackTrace()
}
......
......@@ -27,7 +27,8 @@ object UserWeight {
data.vedioRules.corAl_VIDEO.rate,
data.vedioRules.csjfulL_VEDIO.rate,
data.vedioRules.kS_VEDIO.rate,
data.vedioRules.rtA_VEDIO.rate
data.vedioRules.rtA_VEDIO.rate,
data.vedioRules.gromorE_VEDIO.rate
)
LogUtil.d(TAG, "首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} " +
"ylhWeight:${data.vedioRules.ylH_VEDIO.rate} " +
......@@ -36,6 +37,7 @@ object UserWeight {
"shWeight:${data.vedioRules.corAl_VIDEO.rate} " +
"flWeight:${data.vedioRules.fL_VEDIO.rate} " +
"rtaWeight:${data.vedioRules.rtA_VEDIO.rate} " +
"groMoreWeight:${data.vedioRules.gromorE_VEDIO.rate} "+
"ksWeight:${data.vedioRules.kS_VEDIO.rate}"
)
// 广告视频数
......@@ -47,6 +49,7 @@ object UserWeight {
AppConfig.ksVideoAdCount = data.vedioRules.kS_VEDIO.surplus
AppConfig.rtaVideoAdCount = data.vedioRules.rtA_VEDIO.surplus
AppConfig.csjFullVideoAdCount = data.vedioRules.csjfulL_VEDIO.surplus
AppConfig.groMoreVideoAdCount = data.vedioRules.gromorE_VEDIO.surplus
LogUtil.d(TAG, "首页视频数:csjCount:${AppConfig.csjVideoAdCount} " +
"ylhCount:${AppConfig.ylhAdCount} " +
"sdhzCount:${AppConfig.wnVideoAdCount} " +
......@@ -54,6 +57,7 @@ object UserWeight {
"shCount:${AppConfig.shVideoAdCount} " +
"flCount:${AppConfig.flVideoAdCount} " +
"rtaCount:${AppConfig.rtaVideoAdCount} " +
"groMoreCount:${AppConfig.groMoreVideoAdCount} " +
"ksCount:${AppConfig.ksVideoAdCount}"
)
}
......
......@@ -88,6 +88,7 @@ public class DrawcashBean implements Serializable {
private int CORAL_VEDIO;
private int KS_VEDIO;
private int RTA_VEDIO;
private int GROMORE_VEDIO;
public int getRTA_VEDIO() {
return RTA_VEDIO;
......@@ -124,6 +125,10 @@ public class DrawcashBean implements Serializable {
public int getKS_VEDIO() {
return KS_VEDIO;
}
public int getGROMORE_VEDIO() {
return GROMORE_VEDIO;
}
}
public class CashOutMoneyArrBean implements Serializable {
......
......@@ -12,6 +12,7 @@ public class VedioRulesBean implements Serializable {
private CORALVedioBean CORAL_VEDIO;
private KSVedioBean KS_VEDIO;
private RTAVedioBean RTA_VEDIO;
private GROMOREVedioBean GROMORE_VEDIO;
private boolean flVideoFlag;
private boolean vedioSleep;
......@@ -121,6 +122,20 @@ public class VedioRulesBean implements Serializable {
}
public class GROMOREVedioBean implements Serializable {
private int surplus;
private int rate;
public int getSurplus() {
return surplus;
}
public int getRate() {
return rate;
}
}
public FLVedioBean getFL_VEDIO() {
return FL_VEDIO;
}
......@@ -145,6 +160,10 @@ public class VedioRulesBean implements Serializable {
return RTA_VEDIO;
}
public GROMOREVedioBean getGROMORE_VEDIO() {
return GROMORE_VEDIO;
}
public void setRTA_VEDIO(RTAVedioBean RTA_VEDIO) {
this.RTA_VEDIO = RTA_VEDIO;
}
......
......@@ -105,9 +105,11 @@ public class AwardPresenter extends BasePresenter<AwardView> {
vo.put("osversion", deviceInfo.getOSVersion());
vo.put("appversion", deviceInfo.getVersionName());
vo.put("appPkgList", getT());
vo.put("ua", deviceInfo.getUserAgent());
if (!TextUtils.isEmpty(MintsApplication.OAID)) {
vo.put("oaid", MintsApplication.OAID);
}
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
new BaseSubscriber<BaseResponse<UserBean>>() {
......
......@@ -152,6 +152,8 @@ public class DrawcashPresenter extends BasePresenter<DrawcashView> {
if (!TextUtils.isEmpty(MintsApplication.OAID)) {
vo.put("oaid", MintsApplication.OAID);
}
vo.put("ua", deviceInfo.getUserAgent());
TrackManager.getInstance().riskinfo();
......
......@@ -41,6 +41,7 @@ class HomePresenter : BasePresenter<HomeView>() {
vo["uuid"] = DeviceUuidFactory().deviceUuid
vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName
vo["ua"] = deviceInfo.userAgent
AppHttpManager.getInstance(loanApplication)
.call(loanService.comSaveTerminalInfo(vo),
......@@ -176,6 +177,7 @@ class HomePresenter : BasePresenter<HomeView>() {
vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName
vo["shumeiId"] = ShumeiManager.getInstance().getShumeiDeviceId()
vo["ua"] = deviceInfo.userAgent
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
object : BaseSubscriber<BaseResponse<Any>>() {
......
......@@ -247,7 +247,7 @@ class LoginPresenter : BasePresenter<LoginView>() {
vo["appversion"] = deviceInfo.versionName
vo["shumeiId"] = ShumeiManager.getInstance().getShumeiDeviceId()
vo["appPkgList"] = t.toString()
vo["ua"] = deviceInfo.userAgent
TrackManager.getInstance().riskinfo()
AppHttpManager.getInstance(loanApplication)
......
......@@ -200,6 +200,7 @@ open class MyPresenter : BasePresenter<MyView>() {
vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName
vo["shumeiId"] = ShumeiManager.getInstance().shumeiDeviceId
vo["ua"] = deviceInfo.userAgent
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
object : BaseSubscriber<BaseResponse<Any>>() {
......
......@@ -72,6 +72,7 @@ class PanPresenter : BasePresenter<PanView>() {
vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName
vo["shumeiId"] = ShumeiManager.getInstance().getShumeiDeviceId()
vo["ua"] = deviceInfo.userAgent
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
object : BaseSubscriber<BaseResponse<Any>>() {
......
......@@ -185,6 +185,7 @@ class TurnTablePresenter : BasePresenter<TurnTableView>() {
vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName
vo["shumeiId"] = ShumeiManager.getInstance().getShumeiDeviceId()
vo["ua"] = deviceInfo.userAgent
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
object : BaseSubscriber<BaseResponse<Any>>() {
......
......@@ -306,7 +306,8 @@ class DrawcashActivity : BaseActivity(),
data.coraL_VEDIO,
data.csjfulL_VEDIO,
data.kS_VEDIO,
data.rtA_VEDIO
data.rtA_VEDIO,
data.gromorE_VEDIO
)
LogUtil.d(TAG, "提现权重值:csjWeight:${data.csJ_VEDIO} " +
"ylhWeight:${data.ylH_VEDIO} " +
......@@ -315,6 +316,7 @@ class DrawcashActivity : BaseActivity(),
"shWeight:${data.coraL_VEDIO} " +
"flWeight:${data.fL_VEDIO} " +
"rtaWeight:${data.rtA_VEDIO} " +
"groMoreWeight:${data.gromorE_VEDIO} " +
"ksWeight:${data.kS_VEDIO}"
)
// 广告视频数
......
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