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
05d5ab15
Commit
05d5ab15
authored
Jun 18, 2025
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[商业化]优化广告逻辑
parent
0db1da16
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
AdInterMgr.kt
...in/java/com/base/appzxhy/business/ads/admob/AdInterMgr.kt
+9
-9
No files found.
app/src/main/java/com/base/appzxhy/business/ads/admob/AdInterMgr.kt
View file @
05d5ab15
...
...
@@ -76,27 +76,27 @@ class AdInterMgr {
if
(!
adState
.
loadingAd
)
{
LogEx
.
logDebug
(
adEvent
.
TAG
,
"inter adState !loadingAd"
)
loadAd
(
activity
,
nowAdEvent
)
{
showReadyAd
(
activity
)
showReadyAd
(
activity
,
nowAdEvent
)
}
}
else
{
LogEx
.
logDebug
(
adEvent
.
TAG
,
"inter adState is loadingAd"
)
loadingCallBack
=
{
showReadyAd
(
activity
)
showReadyAd
(
activity
,
nowAdEvent
)
}
}
}
else
{
LogEx
.
logDebug
(
adEvent
.
TAG
,
"inter ad ready"
)
showReadyAd
(
activity
)
showReadyAd
(
activity
,
nowAdEvent
)
}
}
private
fun
showReadyAd
(
ac
:
Activity
)
{
private
fun
showReadyAd
(
ac
:
Activity
,
adEvent
:
AdEvent
)
{
val
adEvent
=
(
adState
.
currentAdEvent
as
AdmobEvent
?)
// val ac = adState.activityRef?.get()
val
tag
=
adEvent
?.
TAG
?:
""
val
admobEvent
=
(
adEvent
as
AdmobEvent
)
val
tag
=
adEvent
.
TAG
LogEx
.
logDebug
(
tag
,
"showReadyAd ac=$ac currentAd=${adState.currentAd}"
)
if
(
ac
.
isFinishing
||
ac
.
isDestroyed
||
adState
.
currentAd
==
null
)
{
...
...
@@ -112,7 +112,7 @@ class AdInterMgr {
override
fun
onAdShowedFullScreenContent
()
{
super
.
onAdShowedFullScreenContent
()
ad
Event
?
.
showAd
(
responseInfo
,
ac
)
ad
mobEvent
.
showAd
(
responseInfo
,
ac
)
adState
.
onAdDisplayed
()
showCallBack
?.
show
()
...
...
@@ -127,7 +127,7 @@ class AdInterMgr {
showCallBack
?.
adFailed
()
showCallBack
=
null
ad
Event
?
.
adShowError
(
adError
)
ad
mobEvent
.
adShowError
(
adError
)
}
override
fun
onAdDismissedFullScreenContent
()
{
...
...
@@ -142,7 +142,7 @@ class AdInterMgr {
override
fun
onAdClicked
()
{
super
.
onAdClicked
()
ad
Event
?
.
clickAd
(
responseInfo
)
ad
mobEvent
.
clickAd
(
responseInfo
)
//计数
LimitUtils
.
addClickNum
()
}
...
...
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