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
a1f29c05
Commit
a1f29c05
authored
Aug 13, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化空指针
parent
74768dd7
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
22 deletions
+29
-22
BannerManager.kt
...n/java/com/duben/speedplayletu/ad/banner/BannerManager.kt
+1
-1
ExpressManager.kt
...java/com/duben/speedplayletu/ad/express/ExpressManager.kt
+8
-5
MainExpressManager.kt
.../com/duben/speedplayletu/ad/express/MainExpressManager.kt
+7
-5
MyExpressManager.kt
...va/com/duben/speedplayletu/ad/express/MyExpressManager.kt
+7
-5
SplashManager.kt
...n/java/com/duben/speedplayletu/ad/splash/SplashManager.kt
+3
-3
InMoneyVideo.java
...n/java/com/duben/speedplayletu/ad/video/InMoneyVideo.java
+2
-2
InMoneyVideoNoPre.java
...a/com/duben/speedplayletu/ad/video/InMoneyVideoNoPre.java
+1
-1
No files found.
video/app/src/main/java/com/duben/speedplayletu/ad/banner/BannerManager.kt
View file @
a1f29c05
...
...
@@ -70,7 +70,7 @@ object BannerManager {
if
(
it
.
size
>
0
)
{
val
ad
:
TTNativeExpressAd
=
it
[
0
]
bannerAd
=
ad
if
(
bannerAd
!=
null
)
{
if
(
bannerAd
!=
null
&&
bannerAd
!!
.
mediationManager
!=
null
&&
bannerAd
!!
.
mediationManager
.
showEcpm
!=
null
)
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE3
vo
[
"ecpm"
]
=
bannerAd
!!
.
mediationManager
.
showEcpm
.
ecpm
...
...
video/app/src/main/java/com/duben/speedplayletu/ad/express/ExpressManager.kt
View file @
a1f29c05
...
...
@@ -14,6 +14,7 @@ import com.bytedance.sdk.openadsdk.mediation.ad.MediationViewBinder
import
com.duben.speedplayletu.MintsApplication
import
com.duben.speedplayletu.R
import
com.duben.speedplayletu.ad.AdManager
import
com.duben.speedplayletu.ad.banner.BannerManager
import
com.duben.speedplayletu.common.Constant
import
com.duben.speedplayletu.manager.TrackManager
import
com.duben.speedplayletu.utils.ForegroundOrBackground
...
...
@@ -118,11 +119,13 @@ 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
[
"ecpm"
]
=
ecpm
TrackManager
.
getInstance
().
cmtEcpm
(
vo
)
}
if
(
it
.
mediationManager
.
isExpress
)
{
//--------------信息流模板广告渲染----------------
showExpressView
(
it
)
...
...
video/app/src/main/java/com/duben/speedplayletu/ad/express/MainExpressManager.kt
View file @
a1f29c05
...
...
@@ -79,11 +79,13 @@ 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
[
"ecpm"
]
=
ecpm
TrackManager
.
getInstance
().
cmtEcpm
(
vo
)
}
if
(
it
.
mediationManager
.
isExpress
)
{
//--------------信息流模板广告渲染----------------
showExpressView
(
it
,
expressAdCallback
)
...
...
video/app/src/main/java/com/duben/speedplayletu/ad/express/MyExpressManager.kt
View file @
a1f29c05
...
...
@@ -118,11 +118,13 @@ 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
[
"ecpm"
]
=
ecpm
TrackManager
.
getInstance
().
cmtEcpm
(
vo
)
}
if
(
it
.
mediationManager
.
isExpress
)
{
//--------------信息流模板广告渲染----------------
showExpressView
(
it
)
...
...
video/app/src/main/java/com/duben/speedplayletu/ad/splash/SplashManager.kt
View file @
a1f29c05
...
...
@@ -162,9 +162,9 @@ object SplashManager {
isShowAd
=
true
LogUtil
.
d
(
TAG
,
"gromore 开屏广告--> 6、onAdShow "
)
if
(
mTTSplashAd
!=
null
)
{
val
vo
=
HashMap
<
String
,
Any
>()
mTTSplashAd
?.
let
{
if
(
it
.
mediationManager
!=
null
&&
it
.
mediationManager
.
showEcpm
!=
null
)
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"ecpm"
]
=
it
.
mediationManager
.
showEcpm
.
ecpm
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE0
TrackManager
.
getInstance
().
cmtEcpm
(
vo
)
...
...
video/app/src/main/java/com/duben/speedplayletu/ad/video/InMoneyVideo.java
View file @
a1f29c05
...
...
@@ -189,7 +189,7 @@ public class InMoneyVideo {
@Override
public
void
onAdShow
()
{
if
(
mttRewardAd
!=
null
)
{
if
(
mttRewardAd
.
getMediationManager
().
getShowEcpm
()
!=
null
)
{
if
(
mttRewardAd
.
getMediationManager
()
!=
null
&&
mttRewardAd
.
getMediationManager
()
.
getShowEcpm
()
!=
null
)
{
nowAdcode
=
mttRewardAd
.
getMediationManager
().
getShowEcpm
().
getSlotId
();
nowEcpm
=
mttRewardAd
.
getMediationManager
().
getShowEcpm
().
getEcpm
();
nowAdSource
=
mttRewardAd
.
getMediationManager
().
getShowEcpm
().
getSdkName
();
...
...
@@ -218,7 +218,7 @@ public class InMoneyVideo {
int
adCount
=
AppPreferencesManager
.
INSTANCE
.
get
().
getInt
(
Constant
.
VEDIO_AD_COUNT
,
0
);
if
(
adCount
<
50
)
{
AppPreferencesManager
.
INSTANCE
.
get
().
put
(
Constant
.
VEDIO_AD_COUNT
,
adCount
+
1
);
AppPreferencesManager
.
INSTANCE
.
get
().
put
(
Constant
.
VEDIO_AD_COUNT
,
adCount
+
1
);
}
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
...
...
video/app/src/main/java/com/duben/speedplayletu/ad/video/InMoneyVideoNoPre.java
View file @
a1f29c05
...
...
@@ -128,7 +128,7 @@ public class InMoneyVideoNoPre {
}
if
(
mttRewardAd
!=
null
)
{
if
(
mttRewardAd
.
getMediationManager
().
getShowEcpm
()
!=
null
)
{
if
(
mttRewardAd
.
getMediationManager
()
!=
null
&&
mttRewardAd
.
getMediationManager
()
.
getShowEcpm
()
!=
null
)
{
nowAdcode
=
mttRewardAd
.
getMediationManager
().
getShowEcpm
().
getSlotId
();
nowEcpm
=
mttRewardAd
.
getMediationManager
().
getShowEcpm
().
getEcpm
();
nowAdSource
=
mttRewardAd
.
getMediationManager
().
getShowEcpm
().
getSdkName
();
...
...
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