Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_vedio
Commits
8175cb30
Commit
8175cb30
authored
Aug 15, 2024
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
ace01f89
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
295 additions
and
292 deletions
+295
-292
BannerManager.kt
...n/java/com/duben/speedplayletu/ad/banner/BannerManager.kt
+7
-7
DrawExpressManager.kt
...ava/com/duben/speedplayletu/ad/draw/DrawExpressManager.kt
+1
-1
HomeDrawExpressManager.kt
...com/duben/speedplayletu/ad/draw/HomeDrawExpressManager.kt
+1
-1
ExpressManager.kt
...java/com/duben/speedplayletu/ad/express/ExpressManager.kt
+244
-243
MainExpressManager.kt
.../com/duben/speedplayletu/ad/express/MainExpressManager.kt
+34
-32
MyExpressManager.kt
...va/com/duben/speedplayletu/ad/express/MyExpressManager.kt
+7
-7
SplashManager.kt
...n/java/com/duben/speedplayletu/ad/splash/SplashManager.kt
+1
-1
No files found.
video/app/src/main/java/com/duben/speedplayletu/ad/banner/BannerManager.kt
View file @
8175cb30
...
...
@@ -70,19 +70,19 @@ object BannerManager {
if
(
it
.
size
>
0
)
{
val
ad
:
TTNativeExpressAd
=
it
[
0
]
bannerAd
=
ad
if
(
bannerAd
!=
null
&&
bannerAd
!!
.
mediationManager
!=
null
&&
bannerAd
!!
.
mediationManager
.
showEcpm
!=
null
)
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE3
vo
[
"cpmFen"
]
=
bannerAd
!!
.
mediationManager
.
showEcpm
.
ecpm
TrackManager
.
getInstance
().
cmtEcpm
(
vo
)
}
bannerAd
?.
setExpressInteractionListener
(
object
:
TTNativeExpressAd
.
ExpressAdInteractionListener
{
override
fun
onAdClicked
(
view
:
View
?,
type
:
Int
)
{
}
override
fun
onAdShow
(
view
:
View
?,
type
:
Int
)
{
if
(
bannerAd
!=
null
&&
bannerAd
!!
.
mediationManager
!=
null
&&
bannerAd
!!
.
mediationManager
.
showEcpm
!=
null
&&
bannerAd
!!
.
mediationManager
.
showEcpm
.
ecpm
!=
null
)
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE3
vo
[
"cpmFen"
]
=
bannerAd
!!
.
mediationManager
.
showEcpm
.
ecpm
TrackManager
.
getInstance
().
cmtEcpm
(
vo
)
}
}
override
fun
onRenderFail
(
view
:
View
?,
msg
:
String
?,
code
:
Int
)
{
...
...
video/app/src/main/java/com/duben/speedplayletu/ad/draw/DrawExpressManager.kt
View file @
8175cb30
...
...
@@ -150,7 +150,7 @@ class DrawExpressManager {
private
fun
showAd
(
ttFeedAd
:
TTFeedAd
?)
{
ttFeedAd
?.
let
{
if
(
it
.
mediationManager
!=
null
&&
it
.
mediationManager
.
showEcpm
!=
null
)
{
if
(
it
.
mediationManager
!=
null
&&
it
.
mediationManager
.
showEcpm
!=
null
&&
it
.
mediationManager
.
showEcpm
.
ecpm
!=
null
)
{
val
ecpm
=
it
.
mediationManager
.
showEcpm
.
ecpm
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE4
...
...
video/app/src/main/java/com/duben/speedplayletu/ad/draw/HomeDrawExpressManager.kt
View file @
8175cb30
...
...
@@ -143,7 +143,7 @@ class HomeDrawExpressManager {
private
fun
showAd
(
ttFeedAd
:
TTFeedAd
?)
{
ttFeedAd
?.
let
{
if
(
it
.
mediationManager
!=
null
&&
it
.
mediationManager
.
showEcpm
!=
null
)
{
if
(
it
.
mediationManager
!=
null
&&
it
.
mediationManager
.
showEcpm
!=
null
&&
it
.
mediationManager
.
showEcpm
.
ecpm
!=
null
)
{
val
ecpm
=
it
.
mediationManager
.
showEcpm
.
ecpm
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE4
...
...
video/app/src/main/java/com/duben/speedplayletu/ad/express/ExpressManager.kt
View file @
8175cb30
...
...
@@ -119,13 +119,6 @@ class ExpressManager {
private
fun
showAd
()
{
mTTFeedAd
?.
let
{
if
(
it
.
mediationManager
!=
null
&&
it
.
mediationManager
.
showEcpm
!=
null
)
{
val
ecpm
=
it
.
mediationManager
.
showEcpm
.
ecpm
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE1
vo
[
"cpmFen"
]
=
ecpm
TrackManager
.
getInstance
().
cmtEcpm
(
vo
)
}
if
(
it
.
mediationManager
.
isExpress
)
{
//--------------信息流模板广告渲染----------------
showExpressView
(
it
)
...
...
@@ -226,6 +219,14 @@ class ExpressManager {
override
fun
onAdShow
()
{
Log
.
i
(
TAG
,
"onAdShow"
)
Log
.
i
(
TAG
,
"ad mediaExtraInfo ${it.mediaExtraInfo}"
)
if
(
it
.
mediationManager
!=
null
&&
it
.
mediationManager
.
showEcpm
!=
null
&&
it
.
mediationManager
.
showEcpm
.
ecpm
!=
null
)
{
val
ecpm
=
it
.
mediationManager
.
showEcpm
.
ecpm
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE1
vo
[
"cpmFen"
]
=
ecpm
TrackManager
.
getInstance
().
cmtEcpm
(
vo
)
}
}
})
...
...
video/app/src/main/java/com/duben/speedplayletu/ad/express/MainExpressManager.kt
View file @
8175cb30
...
...
@@ -13,6 +13,7 @@ import com.duben.speedplayletu.utils.ForegroundOrBackground
import
com.duben.speedplayletu.utils.LogUtil
import
com.duben.speedplayletu.utils.UIUtils
import
com.duben.speedplayletu.BuildConfig
private
val
TAG
=
MainExpressManager
::
class
.
java
.
simpleName
/**
...
...
@@ -79,13 +80,7 @@ class MainExpressManager {
expressAdCallback
:
ExpressAdCallback
)
{
ttNativeAd
?.
let
{
if
(
it
.
mediationManager
!=
null
&&
it
.
mediationManager
.
showEcpm
!=
null
)
{
val
ecpm
=
it
.
mediationManager
.
showEcpm
.
ecpm
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE1
vo
[
"cpmFen"
]
=
ecpm
TrackManager
.
getInstance
().
cmtEcpm
(
vo
)
}
if
(
it
.
mediationManager
.
isExpress
)
{
//--------------信息流模板广告渲染----------------
showExpressView
(
it
,
expressAdCallback
)
...
...
@@ -154,6 +149,13 @@ class MainExpressManager {
override
fun
onAdShow
()
{
Log
.
i
(
TAG
,
"onAdShow"
)
Log
.
i
(
TAG
,
"ad mediaExtraInfo ${it.mediaExtraInfo}"
)
if
(
it
.
mediationManager
!=
null
&&
it
.
mediationManager
.
showEcpm
!=
null
&&
it
.
mediationManager
.
showEcpm
.
ecpm
!=
null
)
{
val
ecpm
=
it
.
mediationManager
.
showEcpm
.
ecpm
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE1
vo
[
"cpmFen"
]
=
ecpm
TrackManager
.
getInstance
().
cmtEcpm
(
vo
)
}
}
})
...
...
video/app/src/main/java/com/duben/speedplayletu/ad/express/MyExpressManager.kt
View file @
8175cb30
...
...
@@ -118,13 +118,6 @@ class MyExpressManager {
private
fun
showAd
()
{
mTTFeedAd
?.
let
{
if
(
it
.
mediationManager
!=
null
&&
it
.
mediationManager
.
showEcpm
!=
null
)
{
val
ecpm
=
it
.
mediationManager
.
showEcpm
.
ecpm
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE1
vo
[
"cpmFen"
]
=
ecpm
TrackManager
.
getInstance
().
cmtEcpm
(
vo
)
}
if
(
it
.
mediationManager
.
isExpress
)
{
//--------------信息流模板广告渲染----------------
showExpressView
(
it
)
...
...
@@ -226,6 +219,13 @@ class MyExpressManager {
override
fun
onAdShow
()
{
Log
.
i
(
TAG
,
"onAdShow"
)
Log
.
i
(
TAG
,
"ad mediaExtraInfo ${it.mediaExtraInfo}"
)
if
(
it
.
mediationManager
!=
null
&&
it
.
mediationManager
.
showEcpm
!=
null
&&
it
.
mediationManager
.
showEcpm
.
ecpm
!=
null
)
{
val
ecpm
=
it
.
mediationManager
.
showEcpm
.
ecpm
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE1
vo
[
"cpmFen"
]
=
ecpm
TrackManager
.
getInstance
().
cmtEcpm
(
vo
)
}
}
})
...
...
video/app/src/main/java/com/duben/speedplayletu/ad/splash/SplashManager.kt
View file @
8175cb30
...
...
@@ -163,7 +163,7 @@ object SplashManager {
LogUtil
.
d
(
TAG
,
"gromore 开屏广告--> 6、onAdShow "
)
mTTSplashAd
?.
let
{
if
(
it
.
mediationManager
!=
null
&&
it
.
mediationManager
.
showEcpm
!=
null
)
{
if
(
it
.
mediationManager
!=
null
&&
it
.
mediationManager
.
showEcpm
!=
null
&&
it
.
mediationManager
.
showEcpm
.
ecpm
!=
null
)
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"cpmFen"
]
=
it
.
mediationManager
.
showEcpm
.
ecpm
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE0
...
...
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