Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
C
clean master
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
clean master
Commits
8a460256
Commit
8a460256
authored
May 17, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
启动页对齐正式版本,添加通知跳转上报
parent
d26e0468
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
AdUtils.kt
app/src/main/java/com/zxhyis/toolss/ad/AdUtils.kt
+15
-3
No files found.
app/src/main/java/com/zxhyis/toolss/ad/AdUtils.kt
View file @
8a460256
package
com.zxhyis.toolss.ad
package
com.zxhyis.toolss.ad
import
android.text.TextUtils
import
android.text.TextUtils
import
com.blankj.utilcode.util.SPUtils
import
com.zxhyis.toolss.FileApp
import
com.zxhyis.toolss.FileApp
import
com.zxhyis.toolss.ad.bean.AdsCfg
import
org.json.JSONObject
object
AdUtils
{
object
AdUtils
{
...
@@ -17,9 +20,9 @@ object AdUtils {
...
@@ -17,9 +20,9 @@ object AdUtils {
}
}
if
(
TextUtils
.
equals
(
adEntity
.
type
,
"interstitial"
))
{
if
(
TextUtils
.
equals
(
adEntity
.
type
,
"interstitial"
))
{
AdmobUtils
.
adShowCount
=
adEntity
.
show_limit
AdmobUtils
.
adShowCount
=
adEntity
.
show_limit
// AdmobUtils.adShowCount = 5
// AdmobUtils.adShowCount = 5
// Log.e("MXL", "AdmobUtils.adShowCount: " + AdmobUtils.adShowCount)
// Log.e("MXL", "AdmobUtils.adShowCount: " + AdmobUtils.adShowCount)
val
isOrganic
=
UserChancelEx
.
isOrganicUser
()
val
isOrganic
=
UserChancelEx
.
isOrganicUser
()
if
(
isOrganic
)
{
if
(
isOrganic
)
{
if
(!
canNextTime
(
"interstitial"
,
ComUtils
.
getComConfig
().
nature_insert_interval
))
{
if
(!
canNextTime
(
"interstitial"
,
ComUtils
.
getComConfig
().
nature_insert_interval
))
{
...
@@ -32,7 +35,7 @@ object AdUtils {
...
@@ -32,7 +35,7 @@ object AdUtils {
}
}
}
else
if
(
TextUtils
.
equals
(
adEntity
.
type
,
"native"
))
{
}
else
if
(
TextUtils
.
equals
(
adEntity
.
type
,
"native"
))
{
AdmobUtils
.
nativeAdShowCount
=
adEntity
.
show_limit
AdmobUtils
.
nativeAdShowCount
=
adEntity
.
show_limit
// AdmobUtils.nativeAdShowCount = 5
// AdmobUtils.nativeAdShowCount = 5
//Log.e("MXL", "AdmobUtils.nativeAdShowCount: " + AdmobUtils.nativeAdShowCount)
//Log.e("MXL", "AdmobUtils.nativeAdShowCount: " + AdmobUtils.nativeAdShowCount)
}
}
if
(!
canNextTime
(
slot
,
adEntity
.
show_interval
))
{
if
(!
canNextTime
(
slot
,
adEntity
.
show_interval
))
{
...
@@ -58,5 +61,14 @@ object AdUtils {
...
@@ -58,5 +61,14 @@ object AdUtils {
return
(
System
.
currentTimeMillis
()
-
lastPushTime
)
/
1000
>
interval
return
(
System
.
currentTimeMillis
()
-
lastPushTime
)
/
1000
>
interval
}
}
fun
getLoadingTime
()
{
val
obj
=
JSONObject
(
ComUtils
.
getComConfigString
())
val
adCig
=
obj
.
getJSONObject
(
"ads_cfg"
)
val
adObj
=
adCig
.
getJSONObject
(
"splash_slot"
)
val
entity
:
AdsCfg
.
AdEntity
=
AdsCfg
.
AdEntity
()
entity
.
loading_page_time
=
adObj
.
optInt
(
"loading_page_time"
,
0
)
SPUtils
.
getInstance
().
put
(
"loading_page_time"
,
adObj
.
optInt
(
"loading_page_time"
,
0
))
}
}
}
\ No newline at end of file
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