Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
D
Data Recovery White
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
Data Recovery White
Commits
fb9c5948
Commit
fb9c5948
authored
Jul 18, 2024
by
leichao.gao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
fa93ed46
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
14 deletions
+5
-14
AdMaxEvent.kt
...src/main/java/com/base/datarecovery/ads/max/AdMaxEvent.kt
+2
-0
AdMaxInterstitialUtils.kt
...a/com/base/datarecovery/ads/max/AdMaxInterstitialUtils.kt
+1
-4
AdMaxNativeUtils.kt
...in/java/com/base/datarecovery/ads/max/AdMaxNativeUtils.kt
+0
-5
AdMaxOpenUtils.kt
...main/java/com/base/datarecovery/ads/max/AdMaxOpenUtils.kt
+1
-4
NotificationUtil.kt
...c/main/java/com/base/datarecovery/fcm/NotificationUtil.kt
+1
-1
No files found.
app/src/main/java/com/base/datarecovery/ads/max/AdMaxEvent.kt
View file @
fb9c5948
...
...
@@ -7,6 +7,7 @@ import com.applovin.mediation.MaxAdRevenueListener
import
com.applovin.sdk.AppLovinSdk
import
com.base.datarecovery.help.BaseApplication
import
com.base.datarecovery.utils.EventUtils
import
com.base.datarecovery.utils.LogEx
import
com.facebook.FacebookSdk
import
com.google.firebase.analytics.FirebaseAnalytics
import
com.google.firebase.analytics.ktx.analytics
...
...
@@ -87,6 +88,7 @@ object AdMaxEvent {
class
EventOnPaidEventListener
:
MaxAdRevenueListener
{
override
fun
onAdRevenuePaid
(
ad
:
MaxAd
)
{
LogEx
.
logDebug
(
"glc"
,
"onAdRevenuePaid"
)
val
params
=
Bundle
()
val
currentImpressionRevenue
:
Double
=
ad
.
revenue
// In USD
val
mFirebaseAnalytics
=
FirebaseAnalytics
.
getInstance
(
BaseApplication
.
context
)
...
...
app/src/main/java/com/base/datarecovery/ads/max/AdMaxInterstitialUtils.kt
View file @
fb9c5948
...
...
@@ -86,6 +86,7 @@ object AdMaxInterstitialUtils {
LogEx
.
logDebug
(
TAG
,
"onAdDisplayFailed"
)
}
})
interstitialAd
?.
setRevenueListener
(
AdMaxEvent
.
EventOnPaidEventListener
())
}
}
...
...
@@ -118,7 +119,6 @@ object AdMaxInterstitialUtils {
}
this
.
onHidden
=
onHidden
interstitialAd
?.
setRevenueListener
(
AdMaxEvent
.
EventOnPaidEventListener
())
if
(
interstitialAd
?.
isReady
==
true
)
{
LogEx
.
logDebug
(
TAG
,
"isReady=true"
)
interstitialAd
?.
showAd
()
...
...
@@ -156,9 +156,6 @@ object AdMaxInterstitialUtils {
return
}
setListener
(
activity
)
if
(!
AdDisplayUtils
.
getInstance
().
shouldShowAd
())
{
return
}
if
(
AdMaxInit
.
isAdMaxInit
.
get
())
{
LogEx
.
logDebug
(
TAG
,
"loadInterstitialAd"
)
interstitialAd
?.
loadAd
()
...
...
app/src/main/java/com/base/datarecovery/ads/max/AdMaxNativeUtils.kt
View file @
fb9c5948
...
...
@@ -108,12 +108,7 @@ object AdMaxNativeUtils {
fun
showNativeAd
(
activity
:
Activity
,
parent
:
ViewGroup
,
layout
:
Int
)
{
setNativeAdListener
()
val
obj
=
JSONObject
()
obj
.
put
(
"ad_unit"
,
"NativeAd"
)
EventUtils
.
event
(
"ad_prepare_show"
,
ext
=
obj
)
if
(!
AdDisplayUtils
.
getInstance
().
shouldShowAd
())
{
return
}
...
...
app/src/main/java/com/base/datarecovery/ads/max/AdMaxOpenUtils.kt
View file @
fb9c5948
...
...
@@ -70,9 +70,7 @@ object AdMaxOpenUtils {
}
})
appOpenAd
?.
setRevenueListener
{
ad
->
}
appOpenAd
?.
setRevenueListener
(
AdMaxEvent
.
EventOnPaidEventListener
())
}
}
...
...
@@ -111,7 +109,6 @@ object AdMaxOpenUtils {
if
(
appOpenAd
?.
isReady
==
true
)
{
LogEx
.
logDebug
(
TAG
,
"isReady=false"
)
appOpenAd
?.
setRevenueListener
(
AdMaxEvent
.
EventOnPaidEventListener
())
appOpenAd
?.
showAd
()
}
else
{
appOpenAd
?.
loadAd
()
...
...
app/src/main/java/com/base/datarecovery/fcm/NotificationUtil.kt
View file @
fb9c5948
...
...
@@ -215,7 +215,7 @@ object NotificationUtil {
fun
sendNotification
(
context
:
Context
)
{
val
currentNum
=
AppPreferences
.
getInstance
().
getInt
(
"showNotificationCount_"
+
AdDisplayUtils
.
getInstance
().
getCurrentDate
(),
0
)
val
maxNum
=
AppPreferences
.
getInstance
().
get
Int
(
"maxShowNotificationCount"
,
100
)
val
maxNum
=
AppPreferences
.
getInstance
().
get
String
(
"maxShowNotificationCount"
,
"100"
).
toIntOrNull
()
?:
100
if
(
currentNum
>=
maxNum
)
{
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