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
6240225b
Commit
6240225b
authored
Jul 16, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
d9fbd4be
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
18 deletions
+19
-18
MyApplication.kt
app/src/main/java/com/base/datarecovery/MyApplication.kt
+14
-13
AdMaxEvent.kt
...src/main/java/com/base/datarecovery/ads/max/AdMaxEvent.kt
+5
-5
No files found.
app/src/main/java/com/base/datarecovery/MyApplication.kt
View file @
6240225b
...
@@ -21,6 +21,11 @@ import com.base.datarecovery.utils.InstallHelps
...
@@ -21,6 +21,11 @@ import com.base.datarecovery.utils.InstallHelps
import
com.base.datarecovery.utils.LogEx
import
com.base.datarecovery.utils.LogEx
import
com.base.datarecovery.utils.NewComUtils
import
com.base.datarecovery.utils.NewComUtils
import
com.google.android.gms.ads.MobileAds
import
com.google.android.gms.ads.MobileAds
import
com.google.android.gms.ads.identifier.AdvertisingIdClient
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.MainScope
import
kotlinx.coroutines.async
import
kotlinx.coroutines.launch
import
java.util.UUID
import
java.util.UUID
class
MyApplication
:
BaseApplication
()
{
class
MyApplication
:
BaseApplication
()
{
...
@@ -63,21 +68,17 @@ class MyApplication : BaseApplication() {
...
@@ -63,21 +68,17 @@ class MyApplication : BaseApplication() {
initAdMax
()
initAdMax
()
}
}
InstallHelps
.
init
()
InstallHelps
.
init
()
NewComUtils
.
requestCfg
{
MainScope
().
launch
(
Dispatchers
.
Main
)
{
ScreenStatusReceiver
.
setupScreenStatusListener
(
this
)
val
timerStatus
:
Int
=
AppPreferences
.
getInstance
().
getString
(
"timerS"
,
"1"
).
toIntOrNull
()
?:
1
val
deferred
=
async
(
Dispatchers
.
IO
)
{
if
(
timerStatus
==
0
)
{
try
{
RecoveryTimerManager
.
getInstance
().
stopTaskTimer
()
AdvertisingIdClient
.
getAdvertisingIdInfo
(
context
).
id
}
else
{
}
catch
(
_
:
Exception
)
{
val
timerDelay
:
Int
=
AppPreferences
.
getInstance
().
getString
(
"timerDelay"
,
"1"
).
toIntOrNull
()
?:
1
"unknown"
val
timerInterval
:
Int
=
AppPreferences
.
getInstance
().
getString
(
"timerInterval"
,
"7"
).
toIntOrNull
()
?:
7
if
(!
RecoveryTimerManager
.
getInstance
().
isTaskTimerActive
)
{
RecoveryTimerManager
.
getInstance
().
scheduleTask
(
(
timerDelay
*
60
*
1000
).
toLong
(),
(
timerInterval
*
60
*
1000
).
toLong
()
)
}
}
}
}
val
gid
=
deferred
.
await
()
?:
""
AppPreferences
.
getInstance
().
put
(
"gid"
,
gid
)
}
}
}
}
initLifeListener
()
initLifeListener
()
...
...
app/src/main/java/com/base/datarecovery/ads/max/AdMaxEvent.kt
View file @
6240225b
...
@@ -14,11 +14,11 @@ object AdMaxEvent {
...
@@ -14,11 +14,11 @@ object AdMaxEvent {
obj
.
put
(
"source"
,
nativeAd
.
dspName
)
obj
.
put
(
"source"
,
nativeAd
.
dspName
)
obj
.
put
(
"ad_unit"
,
adUnit
)
obj
.
put
(
"ad_unit"
,
adUnit
)
//
val credentials = mapOf(
val
credentials
=
mapOf
(
// "placementid" to response?.credentials?.get("placementid")
,
"placementid"
to
nativeAd
.
placement
,
// "appid" to response?.credentials?.get("appid")
,
"appid"
to
nativeAd
.
adUnitId
,
// "pubid" to
response?.credentials?.get("pubid")
// "pubid" to
//
)
)
// obj.put("credentials", credentials.toString())
// obj.put("credentials", credentials.toString())
// obj.put("session_id", responseInfo?.responseId)
// obj.put("session_id", responseInfo?.responseId)
// obj.put("networkname", responseInfo?.mediationAdapterClassName)
// obj.put("networkname", responseInfo?.mediationAdapterClassName)
...
...
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