Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
F
File Recovery RecycleBin
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
File Recovery RecycleBin
Commits
65b833d7
Commit
65b833d7
authored
Aug 21, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
abfaf2a9
b76d7bcf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
AdmobMaxHelper.kt
...ava/com/base/filerecoveryrecyclebin/ads/AdmobMaxHelper.kt
+5
-0
No files found.
app/src/main/java/com/base/filerecoveryrecyclebin/ads/AdmobMaxHelper.kt
View file @
65b833d7
...
@@ -14,6 +14,7 @@ import com.base.filerecoveryrecyclebin.ads.max.AdMaxNativeUtils
...
@@ -14,6 +14,7 @@ import com.base.filerecoveryrecyclebin.ads.max.AdMaxNativeUtils
import
com.base.filerecoveryrecyclebin.ads.max.AdMaxOpenUtils
import
com.base.filerecoveryrecyclebin.ads.max.AdMaxOpenUtils
import
com.base.filerecoveryrecyclebin.help.BaseApplication
import
com.base.filerecoveryrecyclebin.help.BaseApplication
import
com.base.filerecoveryrecyclebin.utils.AppPreferences
import
com.base.filerecoveryrecyclebin.utils.AppPreferences
import
com.base.filerecoveryrecyclebin.utils.EventUtils
import
com.base.filerecoveryrecyclebin.utils.LogEx
import
com.base.filerecoveryrecyclebin.utils.LogEx
import
com.google.android.gms.ads.MobileAds
import
com.google.android.gms.ads.MobileAds
import
java.util.concurrent.atomic.AtomicBoolean
import
java.util.concurrent.atomic.AtomicBoolean
...
@@ -78,17 +79,20 @@ object AdmobMaxHelper {
...
@@ -78,17 +79,20 @@ object AdmobMaxHelper {
var
lastShowedOnHiddenTime
=
0L
var
lastShowedOnHiddenTime
=
0L
fun
admobMaxShowInterstitialAd
(
activity
:
Activity
,
isLoading
:
Boolean
=
true
,
onHidden
:
(()
->
Unit
)?
=
null
)
{
fun
admobMaxShowInterstitialAd
(
activity
:
Activity
,
isLoading
:
Boolean
=
true
,
onHidden
:
(()
->
Unit
)?
=
null
)
{
if
(
isBlack
)
{
if
(
isBlack
)
{
EventUtils
.
event
(
"ad_black"
,
"interAd"
)
onHidden
?.
invoke
()
onHidden
?.
invoke
()
return
return
}
}
val
isShowLoadingAd
=
AppPreferences
.
getInstance
().
getString
(
"isShowLoadingAd"
,
"0"
).
toInt
()
val
isShowLoadingAd
=
AppPreferences
.
getInstance
().
getString
(
"isShowLoadingAd"
,
"0"
).
toInt
()
if
(
isShowLoadingAd
==
0
&&
isLoading
)
{
if
(
isShowLoadingAd
==
0
&&
isLoading
)
{
EventUtils
.
event
(
"ad_switch_close"
)
onHidden
?.
invoke
()
onHidden
?.
invoke
()
return
return
}
}
val
adInterval
=
AppPreferences
.
getInstance
().
getString
(
"adInterval"
,
"0"
).
toInt
()
val
adInterval
=
AppPreferences
.
getInstance
().
getString
(
"adInterval"
,
"0"
).
toInt
()
if
((
System
.
currentTimeMillis
()
-
lastShowedOnHiddenTime
)
<
adInterval
*
1000
&&
lastShowedOnHiddenTime
!=
0L
)
{
if
((
System
.
currentTimeMillis
()
-
lastShowedOnHiddenTime
)
<
adInterval
*
1000
&&
lastShowedOnHiddenTime
!=
0L
)
{
onHidden
?.
invoke
()
onHidden
?.
invoke
()
EventUtils
.
event
(
"ad_interval"
)
return
return
}
}
...
@@ -108,6 +112,7 @@ object AdmobMaxHelper {
...
@@ -108,6 +112,7 @@ object AdmobMaxHelper {
onHidden
:
(()
->
Unit
)?
=
null
,
onHidden
:
(()
->
Unit
)?
=
null
,
)
{
)
{
if
(
isBlack
)
{
if
(
isBlack
)
{
EventUtils
.
event
(
"ad_black"
,
"openAd"
)
onHidden
?.
invoke
()
onHidden
?.
invoke
()
return
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