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
4e8a16c5
Commit
4e8a16c5
authored
Jul 18, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
c832cc82
60e4bd51
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
7 deletions
+12
-7
MyApplication.kt
app/src/main/java/com/base/datarecovery/MyApplication.kt
+6
-2
AdMaxInit.kt
app/src/main/java/com/base/datarecovery/ads/max/AdMaxInit.kt
+4
-4
AdMaxOpenUtils.kt
...main/java/com/base/datarecovery/ads/max/AdMaxOpenUtils.kt
+1
-0
GuideFragment.kt
...main/java/com/base/datarecovery/fragment/GuideFragment.kt
+1
-1
No files found.
app/src/main/java/com/base/datarecovery/MyApplication.kt
View file @
4e8a16c5
...
...
@@ -31,7 +31,7 @@ import java.util.UUID
class
MyApplication
:
BaseApplication
()
{
private
val
TAG
=
"M
yApplication
"
private
val
TAG
=
"M
AX
"
var
uuid
=
""
companion
object
{
...
...
@@ -83,7 +83,7 @@ class MyApplication : BaseApplication() {
private
var
lastTimeResume
=
0L
private
fun
isHotLaunch
():
Boolean
{
if
((
lastTimeResume
-
lastTimePause
)
>
1
0
00
)
{
if
((
lastTimeResume
-
lastTimePause
)
>
1
5
00
)
{
return
true
}
return
false
...
...
@@ -96,6 +96,7 @@ class MyApplication : BaseApplication() {
override
fun
onActivityCreated
(
activity
:
Activity
,
savedInstanceState
:
Bundle
?)
{}
override
fun
onActivityStarted
(
activity
:
Activity
)
{
LogEx
.
logDebug
(
TAG
,
"onActivityStarted"
)
count
++
lastTimeResume
=
System
.
currentTimeMillis
()
if
(
count
==
1
&&
isHotLaunch
())
{
...
...
@@ -135,15 +136,18 @@ class MyApplication : BaseApplication() {
}
}
}
lastTimeResume
=
0
}
override
fun
onActivityResumed
(
activity
:
Activity
)
{
LogEx
.
logDebug
(
TAG
,
"onActivityResumed"
)
PAUSED_VALUE
=
1
}
override
fun
onActivityPaused
(
activity
:
Activity
)
{
PAUSED_VALUE
=
2
LogEx
.
logDebug
(
TAG
,
"onActivityPaused"
)
lastTimePause
=
System
.
currentTimeMillis
()
}
...
...
app/src/main/java/com/base/datarecovery/ads/max/AdMaxInit.kt
View file @
4e8a16c5
...
...
@@ -32,10 +32,10 @@ object AdMaxInit {
initConfigBuilder
.
mediationProvider
=
AppLovinMediationProvider
.
MAX
// Enable test mode by default for the current device. Cannot be run on the main thread.
//
val currentGaid = AdvertisingIdClient.getAdvertisingIdInfo(this).id
//
if (currentGaid != null) {
//
initConfigBuilder.testDeviceAdvertisingIds = Collections.singletonList(currentGaid)
//
}
val
currentGaid
=
AdvertisingIdClient
.
getAdvertisingIdInfo
(
this
).
id
if
(
currentGaid
!=
null
)
{
initConfigBuilder
.
testDeviceAdvertisingIds
=
Collections
.
singletonList
(
currentGaid
)
}
// Initialize the AppLovin SDK
val
sdk
=
AppLovinSdk
.
getInstance
(
this
)
...
...
app/src/main/java/com/base/datarecovery/ads/max/AdMaxOpenUtils.kt
View file @
4e8a16c5
...
...
@@ -33,6 +33,7 @@ object AdMaxOpenUtils {
LogEx
.
logDebug
(
TAG
,
"广告拉取成功"
)
openLoadTime
=
System
.
currentTimeMillis
()
loadingListener
?.
invoke
()
loadingListener
=
null
AdMaxEvent
.
pullAd
(
p0
,
"openAd"
)
}
...
...
app/src/main/java/com/base/datarecovery/fragment/GuideFragment.kt
View file @
4e8a16c5
...
...
@@ -56,7 +56,7 @@ class GuideFragment(
}
private
fun
jumpMain
()
{
val
showAd
=
AppPreferences
.
getInstance
().
getString
(
"isShowGuideAd"
,
"
1
"
)
?.
toInt
()
val
showAd
=
AppPreferences
.
getInstance
().
getString
(
"isShowGuideAd"
,
"
0
"
)
?.
toInt
()
if
(
showAd
==
1
)
{
AdmobMaxHelper
.
admobMaxShowInterstitialAd
(
requireActivity
())
{
startActivity
(
Intent
(
requireContext
(),
MainActivity
::
class
.
java
))
...
...
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