Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
L
location share 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
location share white
Commits
de944271
Commit
de944271
authored
Oct 31, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
cd1d0688
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
11 deletions
+16
-11
AdsMgr.kt
app/src/main/java/com/base/locationsharewhite/ads/AdsMgr.kt
+5
-5
AdsShowCallBack.kt
...n/java/com/base/locationsharewhite/ads/AdsShowCallBack.kt
+1
-0
AdInsertMgr.kt
...java/com/base/locationsharewhite/ads/admob/AdInsertMgr.kt
+3
-4
AdOpenMgr.kt
...n/java/com/base/locationsharewhite/ads/admob/AdOpenMgr.kt
+2
-2
SplashActivity.kt
...a/com/base/locationsharewhite/ui/splash/SplashActivity.kt
+5
-0
No files found.
app/src/main/java/com/base/locationsharewhite/ads/AdsMgr.kt
View file @
de944271
package
com.base.locationsharewhite.ads
import
AdInsertMgr
import
android.app.Activity
import
android.content.Context
import
android.view.ViewGroup
import
com.base.locationsharewhite.ads.admob.AdBannerMgr
import
com.base.locationsharewhite.ads.admob.AdInsertMgr
import
com.base.locationsharewhite.ads.admob.AdNativeMgr
import
com.base.locationsharewhite.ads.admob.AdOpenMgr
import
com.google.android.gms.ads.MobileAds
...
...
@@ -70,10 +70,10 @@ object AdsMgr {
* @param showCallBack 展示回调
*/
fun
showOpen
(
activity
:
Activity
,
showCallBack
:
AdsShowCallBack
?
=
null
)
{
if
(!
isInit
||
adsConfigBean
?.
isInBlackList
!=
false
)
{
showCallBack
?.
failed
()
return
}
//
if (!isInit || adsConfigBean?.isInBlackList != false) {
//
showCallBack?.failed()
//
return
//
}
adOpenMgr
.
show
(
activity
,
showCallBack
)
}
...
...
app/src/main/java/com/base/locationsharewhite/ads/AdsShowCallBack.kt
View file @
de944271
...
...
@@ -4,4 +4,5 @@ abstract class AdsShowCallBack {
open
fun
show
()
{}
abstract
fun
close
()
abstract
fun
failed
()
abstract
fun
googleFailed
()
}
\ No newline at end of file
app/src/main/java/com/base/locationsharewhite/ads/admob/AdInsertMgr.kt
View file @
de944271
package
com.base.locationsharewhite.ads.admob
import
android.app.Activity
import
android.content.Context
import
com.base.locationsharewhite.ads.AdsShowCallBack
import
com.base.locationsharewhite.ads.BaseAdMgr
import
com.base.locationsharewhite.ads.admob.LimitUtils
import
com.base.locationsharewhite.helper.config.ConstConfig
import
com.google.android.gms.ads.AdError
import
com.google.android.gms.ads.AdRequest
...
...
@@ -40,7 +39,7 @@ class AdInsertMgr : BaseAdMgr<InterstitialAd>() {
// 如果确实需要,则必须限制最大重试次数,避免在网络受限的情况下连续多次请求
loadingAd
=
false
if
(
activityRef
!=
null
&&
!
showingAd
&&
showCallBack
!=
null
)
{
showCallBack
?.
f
ailed
()
showCallBack
?.
googleF
ailed
()
showCallBack
=
null
}
}
...
...
@@ -108,7 +107,7 @@ class AdInsertMgr : BaseAdMgr<InterstitialAd>() {
showingAd
=
false
currentAd
=
null
activityRef
=
null
this
@AdInsertMgr
.
showCallBack
?.
f
ailed
()
this
@AdInsertMgr
.
showCallBack
?.
googleF
ailed
()
this
@AdInsertMgr
.
showCallBack
=
null
}
...
...
app/src/main/java/com/base/locationsharewhite/ads/admob/AdOpenMgr.kt
View file @
de944271
...
...
@@ -39,7 +39,7 @@ class AdOpenMgr : BaseAdMgr<AppOpenAd>() {
// 如果确实需要,则必须限制最大重试次数,避免在网络受限的情况下连续多次请求
loadingAd
=
false
if
(
activityRef
!=
null
&&
!
showingAd
&&
showCallBack
!=
null
)
{
showCallBack
?.
f
ailed
()
showCallBack
?.
googleF
ailed
()
showCallBack
=
null
}
}
...
...
@@ -107,7 +107,7 @@ class AdOpenMgr : BaseAdMgr<AppOpenAd>() {
showingAd
=
false
currentAd
=
null
activityRef
=
null
this
@AdOpenMgr
.
showCallBack
?.
f
ailed
()
this
@AdOpenMgr
.
showCallBack
?.
googleF
ailed
()
this
@AdOpenMgr
.
showCallBack
=
null
}
...
...
app/src/main/java/com/base/locationsharewhite/ui/splash/SplashActivity.kt
View file @
de944271
...
...
@@ -84,6 +84,11 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(), SplashView {
jumpNext
()
}
override
fun
googleFailed
()
{
LogEx
.
logDebug
(
TAG
,
"AdsShowCallBack googleFailed"
)
jumpNext
()
}
})
splashPresenter
.
startJumpJob
=
true
...
...
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