Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
L
LuckyFarm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
LuckyFarm
Commits
48299f4d
Commit
48299f4d
authored
Nov 05, 2020
by
erwin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
黄军辉
测试广告
parent
33b1c743
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
+16
-5
AdManager.kt
library/src/main/java/com/ym/library/config/AdManager.kt
+8
-5
TTADUtils.kt
library/src/main/java/com/ym/library/csj/TTADUtils.kt
+6
-0
GDTAdUtils.kt
library/src/main/java/com/ym/library/gdt/GDTAdUtils.kt
+2
-0
No files found.
library/src/main/java/com/ym/library/config/AdManager.kt
View file @
48299f4d
...
...
@@ -553,7 +553,7 @@ object AdManager {
Log
.
d
(
TAG
,
"onAdSuccess"
)
Log
.
d
(
"mingzhong"
,
"Success adPlatform"
+
newsEntity
.
adPlatform
+
" platformId"
+
newsEntity
.
platformId
"Success adPlatform"
+
totalEntity
[
0
].
adPlatform
+
" platformId"
+
totalEntity
[
0
]
.
platformId
);
result
.
remove
(
newsEntity
)
AdCache
.
rewardList
.
put
(
slotName
,
result
)
...
...
@@ -562,15 +562,18 @@ object AdManager {
}
override
fun
onAdFail
()
{
Log
.
d
(
TAG
,
"onAdFail totalEntity.size"
+
totalEntity
.
size
)
Log
.
d
(
"mingzhong"
,
"onAdFail totalEntity.size"
+
totalEntity
.
size
)
if
(
totalEntity
.
size
>
0
)
{
var
newsEntitys
=
totalEntity
[
0
]
loadVideoAd
(
mActivity
,
newsEntitys
,
listener
,
this
)
Log
.
d
(
"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
)
// AdCache.rewardList.put(slotName,result)
}
...
...
library/src/main/java/com/ym/library/csj/TTADUtils.kt
View file @
48299f4d
...
...
@@ -473,15 +473,21 @@ object TTADUtils {
EventUtils
.
onEventPullFail
(
entity
)
listener
.
onError
()
callback
.
onAdFail
()
Log
.
e
(
"mingzhong"
,
""
+
code
+
" "
+
message
+
" platformId:"
+
entity
.
platformId
)
}
//视频广告加载后的视频文件资源缓存到本地的回调
override
fun
onRewardVideoCached
()
{
listener
.
onRewardVideoCached
()
Log
.
e
(
"mingzhong"
,
"onRewardVideoCached"
)
}
//视频广告素材加载到,如title,视频url等,不包括视频文件
override
fun
onRewardVideoAdLoad
(
ad
:
TTRewardVideoAd
)
{
Log
.
e
(
"mingzhong"
,
"onRewardVideoAdLoad"
)
EventUtils
.
onEventPullSuccess
(
entity
)
callback
.
onAdSuccess
()
...
...
library/src/main/java/com/ym/library/gdt/GDTAdUtils.kt
View file @
48299f4d
...
...
@@ -29,6 +29,7 @@ import com.ym.library.module.NewsEntity
import
com.ym.library.utils.EventUtils
import
com.ym.library.utils.EventUtils.onEventClick
import
com.ym.library.utils.EventUtils.onEventUM
import
kotlin.math.log
object
GDTAdUtils
{
...
...
@@ -310,6 +311,7 @@ object GDTAdUtils {
override
fun
onError
(
p0
:
AdError
?)
{
EventUtils
.
onEventPullFail
(
entity
)
Log
.
e
(
"huang"
,
p0
?.
errorMsg
+
""
+
p0
?.
errorCode
)
listener
.
onVideoError
()
callback
.
onAdFail
()
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment