Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
A
appzxhy
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
appzxhy
Commits
47214079
Commit
47214079
authored
Jul 11, 2025
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[迭代]
parent
222378a3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
BaseActivity.kt
app/src/main/java/com/simplecleaner/app/base/BaseActivity.kt
+1
-0
AdsMgr.kt
...rc/main/java/com/simplecleaner/app/business/ads/AdsMgr.kt
+7
-3
No files found.
app/src/main/java/com/simplecleaner/app/base/BaseActivity.kt
View file @
47214079
...
...
@@ -151,6 +151,7 @@ abstract class BaseActivity<VB : ViewBinding>(
// intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT)
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_CLEAR_TOP
or
Intent
.
FLAG_ACTIVITY_SINGLE_TOP
)
startActivity
(
intent
)
finish
()
}
var
dialog
:
Dialog
?
=
null
...
...
app/src/main/java/com/simplecleaner/app/business/ads/AdsMgr.kt
View file @
47214079
...
...
@@ -15,6 +15,7 @@ import com.simplecleaner.app.business.ads.admob.AdmobEvent
import
com.simplecleaner.app.business.helper.EventUtils
import
com.google.android.gms.ads.MobileAds
import
com.google.android.gms.ads.initialization.AdapterStatus
import
com.simplecleaner.app.MyApplication
/**
* 广告管理类
...
...
@@ -72,9 +73,12 @@ object AdsMgr {
if
(
true
)
{
admobInitCallBack
?.
invoke
()
admobInitCallBack
=
null
adNativeMgr
.
loadAd
(
context
,
AdmobEvent
(
"nativeAd"
,
context
::
class
.
java
.
simpleName
))
adOpenMgr
.
loadAd
(
context
,
AdmobEvent
(
"openAd"
,
context
::
class
.
java
.
simpleName
))
adInterMgr
.
loadAd
(
context
,
AdmobEvent
(
"interAd"
,
context
::
class
.
java
.
simpleName
))
//处理下app在前台再去预加载
if
(
MyApplication
.
PAUSED_VALUE
==
1
)
{
adNativeMgr
.
loadAd
(
context
,
AdmobEvent
(
"nativeAd"
,
context
::
class
.
java
.
simpleName
))
adOpenMgr
.
loadAd
(
context
,
AdmobEvent
(
"openAd"
,
context
::
class
.
java
.
simpleName
))
adInterMgr
.
loadAd
(
context
,
AdmobEvent
(
"interAd"
,
context
::
class
.
java
.
simpleName
))
}
}
}
}
...
...
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