Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
A
appzxhy
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
wanglei
appzxhy
Commits
0cb73138
Commit
0cb73138
authored
Jun 09, 2025
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[修改]广告总开关
parent
f7f99a4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
AdsMgr.kt
app/src/main/java/com/base/appzxhy/business/ads/AdsMgr.kt
+18
-0
No files found.
app/src/main/java/com/base/appzxhy/business/ads/AdsMgr.kt
View file @
0cb73138
...
...
@@ -10,6 +10,7 @@ import com.applovin.sdk.AppLovinSdkInitializationConfiguration
import
com.base.appzxhy.BuildConfig
import
com.base.appzxhy.GlobalConfig
import
com.base.appzxhy.MyApplication
import
com.base.appzxhy.bean.config.AdConfigBean
import
com.base.appzxhy.bean.config.AdConfigBean.Companion.adsConfigBean
import
com.base.appzxhy.bean.config.ConfigBean.Companion.configBean
import
com.base.appzxhy.business.ads.admob.AdBannerMgr
...
...
@@ -167,6 +168,11 @@ object AdsMgr {
)
{
eventAdUt
()
if
(!
adsConfigBean
.
isAdShow
)
{
showCallBack
?.
failed
()
return
}
if
(
configBean
.
isInBlackList
)
{
EventUtils
.
event
(
"isInBlackList"
,
"isInBlackList=${configBean.isInBlackList}"
)
showCallBack
?.
failed
()
...
...
@@ -208,6 +214,11 @@ object AdsMgr {
)
{
eventAdUt
()
if
(!
adsConfigBean
.
isAdShow
)
{
showCallBack
?.
failed
()
return
}
if
(
configBean
.
isInBlackList
)
{
EventUtils
.
event
(
"isInBlackList"
,
configBean
.
isInBlackList
.
toString
())
showCallBack
?.
failed
()
...
...
@@ -233,6 +244,10 @@ object AdsMgr {
@LayoutRes
layout
:
Int
,
nativeCallBack
:
((
Any
?)
->
Unit
)?
=
null
)
{
if
(!
adsConfigBean
.
isAdShow
)
{
nativeCallBack
?.
invoke
(
null
)
return
}
if
(
configBean
.
isInBlackList
)
{
EventUtils
.
event
(
"isInBlackList"
,
configBean
.
isInBlackList
.
toString
())
return
...
...
@@ -260,6 +275,9 @@ object AdsMgr {
* @param parent 展示广告的父布局容器
*/
fun
showBanner
(
parent
:
ViewGroup
,
collapsible
:
Boolean
=
true
,
adClose
:
(()
->
Unit
)?
=
null
)
{
if
(!
adsConfigBean
.
isAdShow
)
{
return
}
if
(
configBean
.
isInBlackList
)
{
EventUtils
.
event
(
"isInBlackList"
,
configBean
.
isInBlackList
.
toString
())
return
...
...
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