Commit 48299f4d authored by erwin's avatar erwin

黄军辉

    测试广告
parent 33b1c743
...@@ -553,7 +553,7 @@ object AdManager { ...@@ -553,7 +553,7 @@ object AdManager {
Log.d(TAG, "onAdSuccess") Log.d(TAG, "onAdSuccess")
Log.d( Log.d(
"mingzhong", "mingzhong",
"Success adPlatform" + newsEntity.adPlatform + " platformId" + newsEntity.platformId "Success adPlatform" + totalEntity[0].adPlatform + " platformId" + totalEntity[0].platformId
); );
result.remove(newsEntity) result.remove(newsEntity)
AdCache.rewardList.put(slotName, result) AdCache.rewardList.put(slotName, result)
...@@ -562,15 +562,18 @@ object AdManager { ...@@ -562,15 +562,18 @@ object AdManager {
} }
override fun onAdFail() { override fun onAdFail() {
Log.d(TAG, "onAdFail totalEntity.size" + totalEntity.size) Log.d("mingzhong", "onAdFail totalEntity.size" + totalEntity.size)
if (totalEntity.size > 0) { if (totalEntity.size > 0) {
var newsEntitys = totalEntity[0]
loadVideoAd(mActivity, newsEntitys, listener, this)
Log.d( Log.d(
"mingzhong", "mingzhong",
"Fail adPlatform" + newsEntitys.adPlatform + " platformId" + newsEntitys.platformId "Fail adPlatform" + totalEntity[0].adPlatform + " platformId" + totalEntity[0].platformId
); );
var newsEntitys = totalEntity[0]
loadVideoAd(mActivity, newsEntitys, listener, this)
totalEntity.removeAt(0) totalEntity.removeAt(0)
// AdCache.rewardList.put(slotName,result) // AdCache.rewardList.put(slotName,result)
} }
......
...@@ -473,15 +473,21 @@ object TTADUtils { ...@@ -473,15 +473,21 @@ object TTADUtils {
EventUtils.onEventPullFail(entity) EventUtils.onEventPullFail(entity)
listener.onError() listener.onError()
callback.onAdFail() callback.onAdFail()
Log.e("mingzhong",""+code+" "+message +" platformId:"+entity.platformId)
} }
//视频广告加载后的视频文件资源缓存到本地的回调 //视频广告加载后的视频文件资源缓存到本地的回调
override fun onRewardVideoCached() { override fun onRewardVideoCached() {
listener.onRewardVideoCached() listener.onRewardVideoCached()
Log.e("mingzhong","onRewardVideoCached")
} }
//视频广告素材加载到,如title,视频url等,不包括视频文件 //视频广告素材加载到,如title,视频url等,不包括视频文件
override fun onRewardVideoAdLoad(ad: TTRewardVideoAd) { override fun onRewardVideoAdLoad(ad: TTRewardVideoAd) {
Log.e("mingzhong","onRewardVideoAdLoad")
EventUtils.onEventPullSuccess(entity) EventUtils.onEventPullSuccess(entity)
callback.onAdSuccess() callback.onAdSuccess()
......
...@@ -29,6 +29,7 @@ import com.ym.library.module.NewsEntity ...@@ -29,6 +29,7 @@ import com.ym.library.module.NewsEntity
import com.ym.library.utils.EventUtils import com.ym.library.utils.EventUtils
import com.ym.library.utils.EventUtils.onEventClick import com.ym.library.utils.EventUtils.onEventClick
import com.ym.library.utils.EventUtils.onEventUM import com.ym.library.utils.EventUtils.onEventUM
import kotlin.math.log
object GDTAdUtils { object GDTAdUtils {
...@@ -310,6 +311,7 @@ object GDTAdUtils { ...@@ -310,6 +311,7 @@ object GDTAdUtils {
override fun onError(p0: AdError?) { override fun onError(p0: AdError?) {
EventUtils.onEventPullFail(entity) EventUtils.onEventPullFail(entity)
Log.e("huang",p0?.errorMsg+"" +p0?.errorCode)
listener.onVideoError() listener.onVideoError()
callback.onAdFail() callback.onAdFail()
} }
......
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