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
4753246c
Commit
4753246c
authored
Jul 26, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
eb4dd54f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
MyApplication.kt
...ain/java/com/base/filerecoveryrecyclebin/MyApplication.kt
+4
-2
AdMaxInterstitialUtils.kt
.../filerecoveryrecyclebin/ads/max/AdMaxInterstitialUtils.kt
+8
-1
No files found.
app/src/main/java/com/base/filerecoveryrecyclebin/MyApplication.kt
View file @
4753246c
...
@@ -31,6 +31,8 @@ class MyApplication : BaseApplication() {
...
@@ -31,6 +31,8 @@ class MyApplication : BaseApplication() {
companion
object
{
companion
object
{
var
isInterShowing
:
Boolean
=
false
@JvmField
@JvmField
var
PAUSED_VALUE
=
0
var
PAUSED_VALUE
=
0
}
}
...
@@ -96,7 +98,7 @@ class MyApplication : BaseApplication() {
...
@@ -96,7 +98,7 @@ class MyApplication : BaseApplication() {
registerActivityLifecycleCallbacks
(
object
:
ActivityLifecycleCallbacks
{
registerActivityLifecycleCallbacks
(
object
:
ActivityLifecycleCallbacks
{
private
var
count
=
0
private
var
count
=
0
override
fun
onActivityCreated
(
activity
:
Activity
,
savedInstanceState
:
Bundle
?)
{
override
fun
onActivityCreated
(
activity
:
Activity
,
savedInstanceState
:
Bundle
?)
{
LogEx
.
logDebug
(
TAG
,
"activity=$activity"
)
LogEx
.
logDebug
(
TAG
,
"activity=$activity"
)
ActivityManagerUtils
.
getInstance
().
addActivity
(
activity
)
ActivityManagerUtils
.
getInstance
().
addActivity
(
activity
)
}
}
...
@@ -114,7 +116,7 @@ class MyApplication : BaseApplication() {
...
@@ -114,7 +116,7 @@ class MyApplication : BaseApplication() {
}
}
LogEx
.
logDebug
(
TAG
,
"flag=$flag"
)
LogEx
.
logDebug
(
TAG
,
"flag=$flag"
)
if
(
flag
)
{
if
(
flag
||
!
isInterShowing
)
{
if
(
AdmobMaxHelper
.
isOpenAdLoaded
())
{
if
(
AdmobMaxHelper
.
isOpenAdLoaded
())
{
AdmobMaxHelper
.
admobMaxShowOpenAd
(
activity
,
{},
{})
AdmobMaxHelper
.
admobMaxShowOpenAd
(
activity
,
{},
{})
}
else
{
}
else
{
...
...
app/src/main/java/com/base/filerecoveryrecyclebin/ads/max/AdMaxInterstitialUtils.kt
View file @
4753246c
...
@@ -7,6 +7,7 @@ import com.applovin.mediation.MaxAd
...
@@ -7,6 +7,7 @@ import com.applovin.mediation.MaxAd
import
com.applovin.mediation.MaxAdListener
import
com.applovin.mediation.MaxAdListener
import
com.applovin.mediation.MaxError
import
com.applovin.mediation.MaxError
import
com.applovin.mediation.ads.MaxInterstitialAd
import
com.applovin.mediation.ads.MaxInterstitialAd
import
com.base.filerecoveryrecyclebin.MyApplication
import
com.base.filerecoveryrecyclebin.R
import
com.base.filerecoveryrecyclebin.R
import
com.base.filerecoveryrecyclebin.ads.AdDisplayUtils
import
com.base.filerecoveryrecyclebin.ads.AdDisplayUtils
import
com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper.isAdInit
import
com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper.isAdInit
...
@@ -57,6 +58,8 @@ object AdMaxInterstitialUtils {
...
@@ -57,6 +58,8 @@ object AdMaxInterstitialUtils {
LogEx
.
logDebug
(
TAG
,
"onAdDisplayed"
)
LogEx
.
logDebug
(
TAG
,
"onAdDisplayed"
)
AdDisplayUtils
.
getInstance
().
incrementAdDisplayCount
()
AdDisplayUtils
.
getInstance
().
incrementAdDisplayCount
()
AdMaxEvent
.
showAd
(
p0
,
"interAd"
,
activityString
)
AdMaxEvent
.
showAd
(
p0
,
"interAd"
,
activityString
)
MyApplication
.
isInterShowing
=
true
}
}
override
fun
onAdHidden
(
p0
:
MaxAd
)
{
override
fun
onAdHidden
(
p0
:
MaxAd
)
{
...
@@ -65,6 +68,8 @@ object AdMaxInterstitialUtils {
...
@@ -65,6 +68,8 @@ object AdMaxInterstitialUtils {
onHidden
=
null
onHidden
=
null
AdMaxOpenUtils
.
loadAppOpenAd
(
activity
)
AdMaxOpenUtils
.
loadAppOpenAd
(
activity
)
loadInterstitialAd
(
activity
)
loadInterstitialAd
(
activity
)
MyApplication
.
isInterShowing
=
false
}
}
override
fun
onAdClicked
(
p0
:
MaxAd
)
{
override
fun
onAdClicked
(
p0
:
MaxAd
)
{
...
@@ -83,6 +88,8 @@ object AdMaxInterstitialUtils {
...
@@ -83,6 +88,8 @@ object AdMaxInterstitialUtils {
obj2
.
put
(
"reason"
,
p1
.
message
)
obj2
.
put
(
"reason"
,
p1
.
message
)
obj2
.
put
(
"ad_unit"
,
"interAd"
)
obj2
.
put
(
"ad_unit"
,
"interAd"
)
EventUtils
.
event
(
"ad_show_error"
,
ext
=
obj2
)
EventUtils
.
event
(
"ad_show_error"
,
ext
=
obj2
)
MyApplication
.
isInterShowing
=
false
}
}
})
})
interstitialAd
?.
setRevenueListener
(
AdMaxEvent
.
EventOnPaidEventListener
())
interstitialAd
?.
setRevenueListener
(
AdMaxEvent
.
EventOnPaidEventListener
())
...
@@ -184,7 +191,7 @@ object AdMaxInterstitialUtils {
...
@@ -184,7 +191,7 @@ object AdMaxInterstitialUtils {
interstitialAd
?.
loadAd
()
interstitialAd
?.
loadAd
()
AdDisplayUtils
.
getInstance
().
incrementAdRequestCount
()
AdDisplayUtils
.
getInstance
().
incrementAdRequestCount
()
return
true
return
true
}
else
{
}
else
{
EventUtils
.
event
(
"isAdInit"
,
value
=
"loadInterstitialAd isAdInit=${isAdInit.get()}"
)
EventUtils
.
event
(
"isAdInit"
,
value
=
"loadInterstitialAd isAdInit=${isAdInit.get()}"
)
}
}
return
false
return
false
...
...
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