Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
D
Data Recovery 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
Data Recovery White
Commits
28de76c7
Commit
28de76c7
authored
Jul 18, 2024
by
leichao.gao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
5e06a16d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
4 deletions
+27
-4
MyApplication.kt
app/src/main/java/com/base/datarecovery/MyApplication.kt
+12
-3
SplashActivity.kt
...ain/java/com/base/datarecovery/activity/SplashActivity.kt
+7
-0
AdMaxInit.kt
app/src/main/java/com/base/datarecovery/ads/max/AdMaxInit.kt
+2
-0
AdMaxOpenUtils.kt
...main/java/com/base/datarecovery/ads/max/AdMaxOpenUtils.kt
+6
-1
No files found.
app/src/main/java/com/base/datarecovery/MyApplication.kt
View file @
28de76c7
...
...
@@ -102,12 +102,21 @@ class MyApplication : BaseApplication() {
val
topActivity
:
Activity
?
=
ActivityManagerUtils
.
getInstance
().
topActivity
va
l
flag
=
if
(
topActivity
==
null
)
{
va
r
flag
=
if
(
topActivity
==
null
)
{
true
}
else
{
ConfigHelper
.
noLoadingActivities
.
all
{
!
topActivity
.
localClassName
.
contains
(
it
,
true
)
}
ConfigHelper
.
noLoadingActivities
.
all
{
!
topActivity
.
localClassName
.
contains
(
it
,
true
)
}
}
if
(
activity
.
localClassName
.
contains
(
"AppLovinFullscreenActivity"
))
{
flag
=
false
}
LogEx
.
logDebug
(
TAG
,
"flag=$flag"
)
LogEx
.
logDebug
(
TAG
,
"flag=$flag"
+
" activity:"
+
activity
.
localClassName
)
if
(
flag
)
{
if
(
AdmobMaxHelper
.
isOpenAdLoaded
())
{
...
...
app/src/main/java/com/base/datarecovery/activity/SplashActivity.kt
View file @
28de76c7
...
...
@@ -130,6 +130,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
progressFlow
.
collectLatest
{
if
(
it
>=
100
)
{
job
?.
cancel
()
LogEx
.
logDebug
(
TAG
,
"jumpNext"
)
jumpNext
()
this
.
cancel
()
}
...
...
@@ -138,6 +139,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
}
private
fun
jumpNext
()
{
LogEx
.
logDebug
(
TAG
,
" when (actionId) {:jumpNext: "
+
actionId
)
when
(
actionId
)
{
ID_JUNK_CLEAN_PUSH
->
{
...
...
@@ -233,13 +235,18 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
val
value
=
binding
.
pb
.
progress
+
2
binding
.
pb
.
setProgress
(
value
,
true
)
progress
.
emit
(
value
)
LogEx
.
logDebug
(
TAG
,
"startProgress:"
+
isActive
+
" progress.emit(value)"
)
val
delayTime
=
450L
delay
(
delayTime
)
LogEx
.
logDebug
(
TAG
,
"startProgress:"
+
isActive
+
" delay(delayTime)"
)
processTime
+=
delayTime
LogEx
.
logDebug
(
TAG
,
"startProgress:"
+
isActive
+
" processTime += delayTime"
)
if
(
processTime
>=
Random
.
nextLong
(
3000
,
4000
))
{
LogEx
.
logDebug
(
TAG
,
"startProgress:"
+
isActive
+
" Random.nextLong(3000, 4000)"
)
if
(!
outTimeAdStart
)
{
outTimeAdStart
=
true
LogEx
.
logDebug
(
TAG
,
"outTimeAd:"
+
isActive
)
outTimeAd
()
}
}
...
...
app/src/main/java/com/base/datarecovery/ads/max/AdMaxInit.kt
View file @
28de76c7
package
com.base.datarecovery.ads.max
import
android.content.Context
import
android.util.Log
import
com.applovin.sdk.AppLovinMediationProvider
import
com.applovin.sdk.AppLovinSdk
import
com.applovin.sdk.AppLovinSdkInitializationConfiguration
...
...
@@ -19,6 +20,7 @@ object AdMaxInit {
var
maxInitAction
:
(()
->
Unit
)?
=
null
fun
Context
.
initAdMax
()
{
Log
.
d
(
TAG
,
"initAdMax"
)
// If you want to test your own AppLovin SDK key, change the value here and update the package name in the build.gradle
val
YOUR_SDK_KEY
=
"GGPreND6SRmCt1zJgn5faiLGD8c2PVGPLgPpSg7cHanVTud1DhtuI9MmteTqlEviaJ57WnxW68kQDaATJ5z3cW"
...
...
app/src/main/java/com/base/datarecovery/ads/max/AdMaxOpenUtils.kt
View file @
28de76c7
...
...
@@ -39,6 +39,7 @@ object AdMaxOpenUtils {
LogEx
.
logDebug
(
TAG
,
"广告拉取失败了,onAdLoadFailed:"
+
p1
.
message
.
toString
())
LogEx
.
logDebug
(
TAG
,
"广告拉取失败了,onAdLoadFailed:"
+
p0
)
LogEx
.
logDebug
(
TAG
,
"广告拉取失败了,onAdLoadFailed:"
+
p1
.
code
)
loadingListener
=
null
onHidden
?.
invoke
()
AdDisplayUtils
.
getInstance
().
incrementAdRequestFailCount
()
AdMaxEvent
.
pullAd
(
null
,
"openAd"
)
...
...
@@ -79,7 +80,11 @@ object AdMaxOpenUtils {
}
}
fun
showAppOpenAd
(
activity
:
Activity
,
loaded
:
(()
->
Unit
)?
=
null
,
onHidden
:
(()
->
Unit
)?
=
null
)
{
fun
showAppOpenAd
(
activity
:
Activity
,
loaded
:
(()
->
Unit
)?
=
null
,
onHidden
:
(()
->
Unit
)?
=
null
)
{
setListener
(
activity
)
...
...
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