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
7e837e07
Commit
7e837e07
authored
Jul 26, 2024
by
leichao.gao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
ef56952c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
68 deletions
+67
-68
MyApplication.kt
.../main/java/com/test/easy/easycleanerjunk/MyApplication.kt
+66
-67
office-google-services.json
office-google-services.json
+1
-1
No files found.
app/src/main/java/com/test/easy/easycleanerjunk/MyApplication.kt
View file @
7e837e07
...
...
@@ -2,6 +2,7 @@ package com.test.easy.easycleanerjunk
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.app.Application
import
android.content.Intent
import
android.os.Bundle
import
android.text.TextUtils
...
...
@@ -9,6 +10,7 @@ import com.applovin.sdk.AppLovinMediationProvider
import
com.applovin.sdk.AppLovinSdk
import
com.applovin.sdk.AppLovinSdkInitializationConfiguration
import
com.google.android.gms.ads.MobileAds
import
com.google.android.gms.ads.identifier.AdvertisingIdClient
import
com.test.easy.easycleanerjunk.activity.splash.NewSplashActivity
import
com.test.easy.easycleanerjunk.fcm.ActionBroadcast
import
com.test.easy.easycleanerjunk.fcm.FCMUtil
...
...
@@ -20,11 +22,12 @@ import com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
import
com.test.easy.easycleanerjunk.helps.ads.MaxAdUtils
import
com.test.easy.easycleanerjunk.utils.ActivityManagerUtils
import
com.test.easy.easycleanerjunk.utils.SPUtils
import
java.util.Collections
import
java.util.UUID
import
java.util.concurrent.Executors
class
MyApplication
:
BaseApplication
()
{
class
MyApplication
:
BaseApplication
()
,
Application
.
ActivityLifecycleCallbacks
{
companion
object
{
@JvmField
...
...
@@ -33,6 +36,7 @@ class MyApplication : BaseApplication() {
var
uuid
=
""
override
fun
init
()
{
registerActivityLifecycleCallbacks
(
this
)
initUUid
()
initApp
()
}
...
...
@@ -55,11 +59,12 @@ class MyApplication : BaseApplication() {
val
initConfigBuilder
=
AppLovinSdkInitializationConfiguration
.
builder
(
"GGPreND6SRmCt1zJgn5faiLGD8c2PVGPLgPpSg7cHanVTud1DhtuI9MmteTqlEviaJ57WnxW68kQDaATJ5z3cW"
,
context
).
setMediationProvider
(
AppLovinMediationProvider
.
MAX
)
// val currentGaid = AdvertisingIdClient.getAdvertisingIdInfo(context).id
// if (currentGaid != null) {
// initConfigBuilder.testDeviceAdvertisingIds = Collections.singletonList(currentGaid)
// }
).
setMediationProvider
(
AppLovinMediationProvider
.
ADMOB
)
val
currentGaid
=
AdvertisingIdClient
.
getAdvertisingIdInfo
(
context
).
id
if
(
currentGaid
!=
null
)
{
initConfigBuilder
.
testDeviceAdvertisingIds
=
Collections
.
singletonList
(
currentGaid
)
}
val
initConfig
=
initConfigBuilder
.
build
()
// Initialize the SDK with the configuration
AppLovinSdk
.
getInstance
(
context
).
initialize
(
initConfig
)
{
...
...
@@ -75,7 +80,6 @@ class MyApplication : BaseApplication() {
}
initLifeListener
()
}
private
fun
initNotificationWork
()
{
...
...
@@ -88,82 +92,77 @@ class MyApplication : BaseApplication() {
ActionBroadcast
.
initBroadcast
(
this
)
}
@SuppressLint
(
"UnspecifiedRegisterReceiverFlag"
)
private
fun
initLifeListener
()
{
registerActivityLifecycleCallbacks
(
object
:
ActivityLifecycleCallbacks
{
private
var
count
=
0
override
fun
onActivityCreated
(
activity
:
Activity
,
savedInstanceState
:
Bundle
?)
{}
private
var
count
=
0
override
fun
onActivityCreated
(
activity
:
Activity
,
savedInstanceState
:
Bundle
?)
{}
override
fun
onActivityStarted
(
activity
:
Activity
)
{
count
++
lastTimeResume
=
System
.
currentTimeMillis
()
if
(
count
==
1
&&
isHotLaunch
())
{
override
fun
onActivityStarted
(
activity
:
Activity
)
{
count
++
lastTimeResume
=
System
.
currentTimeMillis
()
if
(
count
==
1
&&
isHotLaunch
())
{
val
topActivity
:
Activity
?
=
ActivityManagerUtils
.
getInstance
().
topActivity
val
topActivity
:
Activity
?
=
ActivityManagerUtils
.
getInstance
().
topActivity
var
flag
=
if
(
topActivity
==
null
)
{
true
var
flag
=
if
(
topActivity
==
null
)
{
true
}
else
{
ConfigHelper
.
noLoadingActivities
.
all
{
!
topActivity
.
localClassName
.
contains
(
it
,
true
)
}
}
if
(
activity
.
localClassName
.
contains
(
"AppLovinFullscreenActivity"
))
{
flag
=
false
}
if
(
flag
)
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
)
{
if
(
MaxAdUtils
.
isOpenAdLoaded
())
{
MaxAdUtils
.
showAppOpenAd
(
activity
)
}
else
{
ConfigHelper
.
noLoadingActivities
.
all
{
!
topActivity
.
localClassName
.
contains
(
it
,
true
)
}
}
if
(
activity
.
localClassName
.
contains
(
"AppLovinFullscreenActivity"
))
{
flag
=
false
topActivity
?.
startActivity
(
Intent
(
topActivity
,
NewSplashActivity
::
class
.
java
).
apply
{
putExtra
(
"isHotLaunch"
,
true
)
putExtra
(
"type"
,
-
1
)
})
}
if
(
flag
)
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
){
if
(
MaxAdUtils
.
isOpenAdLoaded
())
{
MaxAdUtils
.
showAppOpenAd
(
activity
)
}
else
{
topActivity
?.
startActivity
(
Intent
(
topActivity
,
NewSplashActivity
::
class
.
java
).
apply
{
putExtra
(
"isHotLaunch"
,
true
)
putExtra
(
"type"
,
-
1
)
})
}
}
else
{
if
(
AdmobUtils
.
isOpenAdLoaded
())
{
AdmobUtils
.
showAppOpenAd
(
activity
)
}
else
{
topActivity
?.
startActivity
(
Intent
(
topActivity
,
NewSplashActivity
::
class
.
java
).
apply
{
putExtra
(
"isHotLaunch"
,
true
)
putExtra
(
"type"
,
-
1
)
})
}
}
}
else
{
if
(
AdmobUtils
.
isOpenAdLoaded
())
{
AdmobUtils
.
showAppOpenAd
(
activity
)
}
else
{
topActivity
?.
startActivity
(
Intent
(
topActivity
,
NewSplashActivity
::
class
.
java
).
apply
{
putExtra
(
"isHotLaunch"
,
true
)
putExtra
(
"type"
,
-
1
)
})
}
}
}
override
fun
onActivityResumed
(
activity
:
Activity
)
{
PAUSED_VALUE
=
1
}
}
}
override
fun
onActivityResumed
(
activity
:
Activity
)
{
PAUSED_VALUE
=
1
}
override
fun
onActivityPaused
(
activity
:
Activity
)
{
PAUSED_VALUE
=
2
lastTimePause
=
System
.
currentTimeMillis
()
}
override
fun
onActivityStopp
ed
(
activity
:
Activity
)
{
count
--
}
override
fun
onActivityPaus
ed
(
activity
:
Activity
)
{
PAUSED_VALUE
=
2
lastTimePause
=
System
.
currentTimeMillis
()
override
fun
onActivitySaveInstanceState
(
activity
:
Activity
,
outState
:
Bundle
)
{
}
}
override
fun
onActivityDestroyed
(
activity
:
Activity
)
{}
})
override
fun
onActivityStopped
(
activity
:
Activity
)
{
count
--
}
override
fun
onActivitySaveInstanceState
(
activity
:
Activity
,
outState
:
Bundle
)
{}
override
fun
onActivityDestroyed
(
activity
:
Activity
)
{}
private
var
lastTimePause
=
0L
private
var
lastTimeResume
=
0L
private
fun
isHotLaunch
():
Boolean
{
...
...
office-google-services.json
View file @
7e837e07
...
...
@@ -9,7 +9,7 @@
"client_info"
:
{
"mobilesdk_app_id"
:
"1:584455262809:android:d79deca82340de88cbd748"
,
"android_client_info"
:
{
"package_name"
:
"com.kk.
junkcleaner.easy.zxkk
"
"package_name"
:
"com.kk.
cleanmaster.file.cleanmaster.master
"
}
},
"oauth_client"
:
[],
...
...
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