Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
Easy Cleaner Junk
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
Easy Cleaner Junk
Commits
bf26c896
Commit
bf26c896
authored
Jul 26, 2024
by
maxiaoliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步修改广告拉取次数和失败次数配置
parent
c113ff65
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
6 deletions
+10
-6
ConfigBean.kt
...ain/java/com/test/easy/easycleanerjunk/bean/ConfigBean.kt
+2
-1
ComUtils.kt
...main/java/com/test/easy/easycleanerjunk/helps/ComUtils.kt
+2
-0
AdDisplayUtils.java
...m/test/easy/easycleanerjunk/helps/ads/AdDisplayUtils.java
+2
-1
MaxAdUtils.kt
...ava/com/test/easy/easycleanerjunk/helps/ads/MaxAdUtils.kt
+4
-4
No files found.
app/src/main/java/com/test/easy/easycleanerjunk/bean/ConfigBean.kt
View file @
bf26c896
...
...
@@ -24,5 +24,6 @@ class ConfigBean() {
var
dayoutcomeHomePage
:
Int
=
0
//第二次打开到首页开关
var
maxShowNotificationCount
:
Int
=
0
var
admobTrueMaxFlase
:
Int
=
0
var
adRequestCount
:
Int
=
100
var
adRequestFailCount
:
Int
=
20
}
app/src/main/java/com/test/easy/easycleanerjunk/helps/ComUtils.kt
View file @
bf26c896
...
...
@@ -74,6 +74,8 @@ object ComUtils {
maxMultiClick
=
bean
.
maxMultiClick
AdDisplayUtils
.
getInstance
().
setMaxAdDisplayCount
(
bean
.
adShowCount
)
AdDisplayUtils
.
getInstance
().
maxAdClickCount
=
bean
.
adClickCount
AdDisplayUtils
.
getInstance
().
maxAdRequestCount
=
bean
.
adRequestCount
AdDisplayUtils
.
getInstance
().
maxAdRequestFailCount
=
bean
.
adRequestFailCount
callback
(
bean
)
ConfigHelper
.
ifConfig
=
"1"
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/helps/ads/AdDisplayUtils.java
View file @
bf26c896
package
com
.
test
.
easy
.
easycleanerjunk
.
helps
.
ads
;
import
android.content.SharedPreferences
;
import
android.util.Log
;
...
...
@@ -39,7 +40,7 @@ public class AdDisplayUtils {
private
static
final
String
MAX_AD_REQUEST_COUNT_KEY
=
"max_ad_request_count"
;
// 广告请求次数限制的键
private
static
final
String
AD_REQUEST_COUNT_KEY
=
"ad_request_count"
;
private
int
adRequestCount
=
0
;
// 当前广告请求次数
p
rivate
int
maxAdRequestCount
=
0
;
// 当前广告请求次数
p
ublic
int
maxAdRequestCount
=
0
;
// 当前广告请求次数
private
AdDisplayUtils
()
{
currentDate
=
getCurrentDate
();
...
...
app/src/main/java/com/test/easy/easycleanerjunk/helps/ads/MaxAdUtils.kt
View file @
bf26c896
...
...
@@ -536,7 +536,7 @@ object MaxAdUtils {
obj
.
put
(
"placement"
,
ad
?.
placement
)
obj
.
put
(
"mediation"
,
"applovin"
)
obj
.
put
(
"networkplacement"
,
ad
?.
networkPlacement
)
obj
.
put
(
"
requestLatencyMillis
"
,
ad
?.
requestLatencyMillis
)
obj
.
put
(
"
latency
"
,
ad
?.
requestLatencyMillis
)
obj
.
put
(
"valueMicros"
,
ad
?.
revenue
?.
times
(
1000000
))
if
(
error
==
null
)
{
obj
.
put
(
"status"
,
"1"
)
...
...
@@ -558,9 +558,9 @@ object MaxAdUtils {
obj
.
put
(
"placement"
,
ad
?.
placement
)
obj
.
put
(
"mediation"
,
"applovin"
)
obj
.
put
(
"networkplacement"
,
ad
?.
networkPlacement
)
obj
.
put
(
"
requestLatencyMillis
"
,
ad
?.
requestLatencyMillis
)
obj
.
put
(
"
latency
"
,
ad
?.
requestLatencyMillis
)
obj
.
put
(
"valueMicros"
,
ad
?.
revenue
)
obj
.
put
(
"from"
,
activity
)
obj
.
put
(
"from"
,
activity
?.
localClassName
)
EventUtils
.
event
(
"ad_show"
,
ext
=
obj
)
}
...
...
@@ -577,7 +577,7 @@ object MaxAdUtils {
obj
.
put
(
"placement"
,
ad
?.
placement
)
obj
.
put
(
"mediation"
,
"applovin"
)
obj
.
put
(
"networkplacement"
,
ad
?.
networkPlacement
)
obj
.
put
(
"
requestLatencyMillis
"
,
ad
?.
requestLatencyMillis
)
obj
.
put
(
"
latency
"
,
ad
?.
requestLatencyMillis
)
obj
.
put
(
"valueMicros"
,
ad
?.
revenue
)
EventUtils
.
event
(
"ad_click"
,
ext
=
obj
)
}
...
...
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