Commit b4476efa authored by mengcuiguang's avatar mengcuiguang

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

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