Commit b4476efa authored by mengcuiguang's avatar mengcuiguang

优化穿山甲获取ip为空问题

parent de7f256a
......@@ -9,8 +9,8 @@ android {
applicationId "com.mints.goodmoney"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 20
versionName "1.1.9"
versionCode 21
versionName "1.2.0"
flavorDimensions "default"
// dex突破65535的限制
......
......@@ -67,7 +67,7 @@ public class CsjVideoAdManager extends BaseVideoAd {
if (mttRewardVideoAd != null) {
mttRewardVideoAd.setRewardAdInteractionListener(null);
}
ps=null;
ps = null;
activity = null;
}
......@@ -278,9 +278,10 @@ public class CsjVideoAdManager extends BaseVideoAd {
vo.put("adtype", Constant.ADTYPE_VEDIO);
vo.put("tid", tid);
vo.put("adsource", Constant.AD_SOURCE_CSJ);
if (ps != null) {
vo.put("ip", ps.getString(Constant.CSJ_VEDIO_APPIP, ""));
if (ps == null) {
ps = new AppPreferences(activity);
}
vo.put("ip", ps.getString(Constant.CSJ_VEDIO_APPIP, ""));
switch (carrierType) {
case Constant.CARRIER_VERSUS_VIDEO:// 每日任务-视频
......
......@@ -55,10 +55,8 @@ class KsVideoAdManager private constructor(activity: Activity) :
val scene = KsScene.Builder(KsManager.KS_AD_VEDIO_POSTID).build()
KsAdSDK.getLoadManager().loadRewardVideoAd(scene, object : KsLoadManager.RewardVideoAdListener {
override fun onError(p0: Int, p1: String?) {
if (vedioAdStatusListener != null) {
vedioAdStatusListener?.adFail()
}
}
override fun onRewardVideoAdLoad(p0: MutableList<KsRewardVideoAd>?) {
mRewardVideoAd = p0?.get(0)
......@@ -79,10 +77,8 @@ class KsVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_FOUR, "", "")
isClickScreen = false
}
if (vedioAdStatusListener != null) {
vedioAdStatusListener?.adDownload()
}
}
override fun onPageDismiss() {
// ToastUtil.show(activity, "快手激励视频⼴告关闭")
......@@ -91,20 +87,16 @@ class KsVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_THREE, "", "")
if (vedioAdStatusListener != null) {
vedioAdStatusListener?.adSuccess()
}
}
override fun onVideoPlayError(p0: Int, p1: Int) {
// ToastUtil.show(activity, "快手激励视频⼴告播放出错")
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_ONE, (p0).toString(), "")
if (vedioAdStatusListener != null) {
vedioAdStatusListener?.adFail()
}
}
override fun onVideoPlayEnd() {
// ToastUtil.show(activity, "快手激励视频⼴告播放完成")
......
......@@ -85,10 +85,8 @@ class MhVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_FL, Constant.EVENT_TYPE_FOUR, "", "")
isClickScreen = false
}
if (vedioAdStatusListener != null) {
vedioAdStatusListener?.adDownload()
}
}
override fun onVideoComplete() {
LogUtil.d(TAG, "onVideoComplete")
......@@ -101,20 +99,16 @@ class MhVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_FL, Constant.EVENT_TYPE_THREE, "", "")
if (vedioAdStatusListener != null) {
vedioAdStatusListener?.adSuccess()
}
}
override fun onADError(p0: Int) {
LogUtil.d(TAG, "onADError->$p0")
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_FL, Constant.EVENT_TYPE_ONE, (p0).toString(), "")
if (vedioAdStatusListener != null) {
vedioAdStatusListener?.adFail()
}
}
})
......
......@@ -106,10 +106,8 @@ class ShVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SH, Constant.EVENT_TYPE_ONE, (adError.code).toString(), "")
if (vedioAdStatusListener != null) {
vedioAdStatusListener?.adFail()
}
}
override fun onAdShow(@Nullable ad: CoralAD?): Boolean {
LogUtil.d(TAG, "onAdShow")
......@@ -130,9 +128,7 @@ class ShVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SH, Constant.EVENT_TYPE_FOUR, "", "")
isClickScreen = false
}
if (vedioAdStatusListener != null) {
vedioAdStatusListener?.adDownload()
}
return super.onAdClicked(ad)
}
......@@ -171,9 +167,7 @@ class ShVideoAdManager private constructor(activity: Activity) :
LogUtil.d(TAG, "onVideoClosed")
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SH, Constant.EVENT_TYPE_THREE, "", "")
if (vedioAdStatusListener != null) {
vedioAdStatusListener?.adSuccess()
}
return super.onVideoClosed(coralAD, s)
}
......
......@@ -66,10 +66,8 @@ class WnVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SDHZ, Constant.EVENT_TYPE_ONE, (code).toString(), message)
if (vedioAdStatusListener != null) {
vedioAdStatusListener?.adFail()
}
}
override fun onLoad(ad: WNRewardVideoAd) {
ad.interactionListener = object : WNRewardVideoAd.InteractionListener {
......@@ -89,20 +87,16 @@ class WnVideoAdManager private constructor(activity: Activity) :
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SDHZ, Constant.EVENT_TYPE_FOUR, "", "")
isClickScreen = false
}
if (vedioAdStatusListener != null) {
vedioAdStatusListener?.adDownload()
}
}
override fun onAdClose() {
TrackManager.getInstance().reportAddCoinMsg(activity, getAdMapVO(carrierType, Constant.AD_SOURCE_SDHZ, extraId, curCoin))
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SDHZ, Constant.EVENT_TYPE_THREE, "", "")
if (vedioAdStatusListener != null) {
vedioAdStatusListener?.adSuccess()
}
}
override fun onVideoComplete() {
}
......
......@@ -21,5 +21,4 @@
android:layout_height="wrap_content"
android:background="@null"
android:indeterminateOnly="false"
android:max="100"
android:progressDrawable="@drawable/progress_bar_horizontal" />
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