Commit 44c787fd authored by erwin's avatar erwin

黄军辉

    测试广告
parent 48299f4d
...@@ -32,7 +32,7 @@ class BaseApplication : MultiDexApplication() { ...@@ -32,7 +32,7 @@ class BaseApplication : MultiDexApplication() {
//第一步初始化 application //第一步初始化 application
AppliContext.init(this) AppliContext.init(this)
// Config.init(this) // Config.init(this)
NetConfig.setBase_Url(NetConfig.Environment.DEV)// TODO 上线之后提成成 NetConfig.Environment.PRODUCT NetConfig.setBase_Url(NetConfig.Environment.PRODUCT)// TODO 上线之后提成成 NetConfig.Environment.PRODUCT
Constant.appLs = "a03d5320d905cf3b"//applsq Constant.appLs = "a03d5320d905cf3b"//applsq
AdManager.init(this) AdManager.init(this)
......
...@@ -564,6 +564,8 @@ object AdManager { ...@@ -564,6 +564,8 @@ object AdManager {
override fun onAdFail() { override fun onAdFail() {
Log.d("mingzhong", "onAdFail totalEntity.size" + totalEntity.size) Log.d("mingzhong", "onAdFail totalEntity.size" + totalEntity.size)
AdCache.rewardList.put(slotName, totalEntity)
if (totalEntity.size > 0) { if (totalEntity.size > 0) {
Log.d( Log.d(
...@@ -582,6 +584,7 @@ object AdManager { ...@@ -582,6 +584,7 @@ object AdManager {
loadVideoAd(mActivity, totalEntity[0], listener, callback) loadVideoAd(mActivity, totalEntity[0], listener, callback)
totalEntity.removeAt(0) totalEntity.removeAt(0)
AdCache.rewardList.put(slotName, totalEntity)
listener.onSuccess() listener.onSuccess()
} }
......
...@@ -485,13 +485,9 @@ object TTADUtils { ...@@ -485,13 +485,9 @@ object TTADUtils {
//视频广告素材加载到,如title,视频url等,不包括视频文件 //视频广告素材加载到,如title,视频url等,不包括视频文件
override fun onRewardVideoAdLoad(ad: TTRewardVideoAd) { override fun onRewardVideoAdLoad(ad: TTRewardVideoAd) {
Log.e("mingzhong","onRewardVideoAdLoad") Log.e("mingzhong","onRewardVideoAdLoad")
EventUtils.onEventPullSuccess(entity) EventUtils.onEventPullSuccess(entity)
callback.onAdSuccess() callback.onAdSuccess()
var mttRewardVideoAd = ad var mttRewardVideoAd = ad
mttRewardVideoAd.setRewardAdInteractionListener(object : mttRewardVideoAd.setRewardAdInteractionListener(object :
...@@ -579,7 +575,6 @@ object TTADUtils { ...@@ -579,7 +575,6 @@ object TTADUtils {
) { ) {
} }
}) })
Log.e(TAG,"穿山甲激励视频耗时"+ (System.currentTimeMillis()-startTime)+"") Log.e(TAG,"穿山甲激励视频耗时"+ (System.currentTimeMillis()-startTime)+"")
listener.onRewardVideoAdLoad(entity) listener.onRewardVideoAdLoad(entity)
mttRewardVideoAd.showRewardVideoAd(activity) mttRewardVideoAd.showRewardVideoAd(activity)
......
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