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
8499b51a
Commit
8499b51a
authored
Dec 18, 2024
by
guest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
52b90398
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
5 deletions
+44
-5
build.gradle
app/build.gradle
+1
-1
Splash2Activity.kt
.../com/base/datarecovery/activity/splash/Splash2Activity.kt
+41
-2
InstallHelps.kt
...src/main/java/com/base/datarecovery/utils/InstallHelps.kt
+1
-1
activity_battery.xml
app/src/main/res/layout/activity_battery.xml
+1
-1
No files found.
app/build.gradle
View file @
8499b51a
...
...
@@ -118,5 +118,5 @@ dependencies {
//work
implementation
(
"androidx.work:work-runtime-ktx:2.7.1"
)
// 请使用最新版本
implementation
'com.google.android.ump:user-messaging-platform:3.0.0'
}
\ No newline at end of file
app/src/main/java/com/base/datarecovery/activity/splash/Splash2Activity.kt
View file @
8499b51a
...
...
@@ -17,6 +17,11 @@ import com.base.datarecovery.fcm.NotificationUtil
import
com.base.datarecovery.help.BaseActivity
import
com.base.datarecovery.utils.BarUtils
import
com.base.datarecovery.utils.EventUtils
import
com.google.android.gms.ads.MobileAds
import
com.google.android.ump.ConsentInformation
import
com.google.android.ump.ConsentRequestParameters
import
com.google.android.ump.UserMessagingPlatform
import
java.util.concurrent.atomic.AtomicBoolean
@SuppressLint
(
"CustomSplashScreen"
)
class
Splash2Activity
:
BaseActivity
<
ActivitySplashBinding
>(),
...
...
@@ -56,7 +61,7 @@ class Splash2Activity : BaseActivity<ActivitySplashBinding>(),
finish
()
return
}
initSdk
()
NotificationUtil
.
stopNotificationHandler
()
jumpType
=
intent
.
getIntExtra
(
"actionId"
,
0
)
closeNotification
()
...
...
@@ -75,7 +80,41 @@ class Splash2Activity : BaseActivity<ActivitySplashBinding>(),
this
.
putExtra
(
CloseNotificationReceiver
.
NotificationId
,
jumpType
)
})
}
private
lateinit
var
consentInformation
:
ConsentInformation
private
var
isMobileAdsInitializeCalled
=
AtomicBoolean
(
false
)
private
fun
initSdk
(){
val
params
=
ConsentRequestParameters
.
Builder
()
.
build
()
consentInformation
=
UserMessagingPlatform
.
getConsentInformation
(
this
)
consentInformation
.
requestConsentInfoUpdate
(
this
,
params
,
{
UserMessagingPlatform
.
loadAndShowConsentFormIfRequired
(
this
)
{
loadAndShowError
->
if
(
loadAndShowError
!=
null
)
{
}
if
(
consentInformation
.
canRequestAds
())
{
initializeMobileAdsSdk
()
}
}
},
{
})
if
(
consentInformation
.
canRequestAds
())
{
initializeMobileAdsSdk
()
}
}
private
fun
initializeMobileAdsSdk
(){
if
(
isMobileAdsInitializeCalled
.
getAndSet
(
true
))
{
return
}
MobileAds
.
initialize
(
this
)
{}
}
override
fun
onAgreePrivacy
()
{
EventUtils
.
event
(
"app_start"
)
if
(
jumpType
==
0
)
{
...
...
app/src/main/java/com/base/datarecovery/utils/InstallHelps.kt
View file @
8499b51a
...
...
@@ -83,7 +83,7 @@ object InstallHelps {
fun
requestCfg
(
callBackAd
:
Boolean
)
{
NewComUtils
.
requestCfg
{
if
(
callBackAd
)
{
AdmobMaxHelper
.
initAdmobMaxAd
()
//
AdmobMaxHelper.initAdmobMaxAd()
}
changeTimerSp
()
...
...
app/src/main/res/layout/activity_battery.xml
View file @
8499b51a
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
...
...
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