Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_vedio
Commits
2b0b9cbd
Commit
2b0b9cbd
authored
Sep 11, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
非vip用户 添加开屏逻辑 未启用
parent
21942a83
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
4 deletions
+23
-4
MintsApplication.java
...p/src/main/java/com/mints/helivideo/MintsApplication.java
+7
-1
Constant.kt
.../app/src/main/java/com/mints/helivideo/common/Constant.kt
+1
-0
SplashActivity.kt
...n/java/com/mints/helivideo/ui/activitys/SplashActivity.kt
+15
-3
No files found.
video/app/src/main/java/com/mints/helivideo/MintsApplication.java
View file @
2b0b9cbd
...
...
@@ -13,6 +13,7 @@ import com.mints.helivideo.ad.TTAdManagerHolder;
import
com.mints.helivideo.common.Constant
;
import
com.mints.helivideo.manager.TXCSDKService
;
import
com.mints.helivideo.manager.TalkingDataManager
;
import
com.mints.helivideo.manager.UserManager
;
import
com.mints.helivideo.net.LoanService
;
import
com.mints.helivideo.net.V6Service
;
import
com.mints.helivideo.utils.AppPreferencesManager
;
...
...
@@ -72,7 +73,12 @@ public class MintsApplication extends MultiDexApplication {
.
getBoolean
(
Constant
.
LOAN_PERMISSION_FLAG
,
true
))
return
;
// 判断应用是否在前台
ForegroundOrBackground
.
init
(
this
);
// if (UserManager.getInstance().getVipFlag() || AppPreferencesManager.INSTANCE.get()
// .getBoolean(Constant.CLICK_SPLASH, false)) {
// System.out.println("mcg -->>>>>:: MintsApplication initData ForegroundOrBackground.init")
ForegroundOrBackground
.
init
(
this
);
// }
initMiitHelper
();
...
...
video/app/src/main/java/com/mints/helivideo/common/Constant.kt
View file @
2b0b9cbd
...
...
@@ -13,6 +13,7 @@ object Constant {
* 首次弹出权限声明
*/
const
val
LOAN_PERMISSION_FLAG
=
"loan_permission_flag"
const
val
CLICK_SPLASH
=
"CLICK_SPLASH"
const
val
FIRST_SPLASH
=
"first_splash"
const
val
IS_FIRST_AGREE_BTN
=
"is_first_agree_btn"
const
val
IS_FIRST_VIP_BTN
=
"is_first_agree_btn"
...
...
video/app/src/main/java/com/mints/helivideo/ui/activitys/SplashActivity.kt
View file @
2b0b9cbd
package
com.mints.helivideo.ui.activitys
import
android.annotation.SuppressLint
import
android.app.Application
import
android.os.Bundle
import
android.view.KeyEvent
import
android.view.View
import
com.mints.helivideo.MintsApplication
import
com.mints.helivideo.R
import
com.mints.helivideo.ad.AdManager
import
com.mints.helivideo.ad.splash.SplashManager
import
com.mints.helivideo.common.Constant
import
com.mints.helivideo.common.Constant.PRIVACY_URL
import
com.mints.helivideo.common.Constant.REGISTER_URL
import
com.mints.helivideo.manager.LocalVedioManager
import
com.mints.helivideo.manager.TrackManager
import
com.mints.helivideo.manager.UserManager
import
com.mints.helivideo.ui.activitys.base.BaseActivity
...
...
@@ -20,8 +20,8 @@ import com.mints.helivideo.ui.widgets.PowerDialog
import
com.mints.helivideo.ui.widgets.PowerDialog2
import
com.mints.helivideo.ui.widgets.countdowntimer.CountDownTimerSupport
import
com.mints.helivideo.ui.widgets.countdowntimer.OnCountDownTimerListener
import
com.mints.helivideo.utils.AppPreferencesManager
import
com.mints.helivideo.utils.AppPreferencesManager.get
import
com.mints.helivideo.utils.ForegroundOrBackground
import
com.mints.helivideo.utils.LogUtil
import
java.util.*
...
...
@@ -38,6 +38,7 @@ class SplashActivity : BaseActivity() {
private
val
AD_TIME_OUT
=
3000
var
timer
:
CountDownTimerSupport
?
=
null
private
var
isAdSuc
=
false
private
var
isAgree
=
false
override
fun
getContentViewLayoutID
():
Int
{
return
R
.
layout
.
activity_splash
...
...
@@ -69,6 +70,13 @@ class SplashActivity : BaseActivity() {
}
private
fun
initData
()
{
// // 非vip用户延迟调用
// if (!UserManager.getInstance().vipFlag && !isAgree) {
// println("mcg -->>>>>:: splash initData ForegroundOrBackground.init")
//
// ForegroundOrBackground.init(MintsApplication.getContext() as Application?)
// }
val
firstSplash
=
get
().
getBoolean
(
Constant
.
FIRST_SPLASH
,
true
)
if
(!
firstSplash
)
{
SplashManager
.
preLoadAd
(
this
@SplashActivity
)
...
...
@@ -191,6 +199,8 @@ class SplashActivity : BaseActivity() {
powerDialog
!!
.
dismiss
()
}
get
().
put
(
Constant
.
LOAN_PERMISSION_FLAG
,
false
)
get
().
put
(
Constant
.
CLICK_SPLASH
,
true
)
isAgree
=
true
baseApplication
.
thirdConfig
()
TrackManager
.
getInstance
().
visitorlogin
()
initData
()
...
...
@@ -231,6 +241,8 @@ class SplashActivity : BaseActivity() {
powerDialog2
!!
.
dismiss
()
}
get
().
put
(
Constant
.
LOAN_PERMISSION_FLAG
,
false
)
get
().
put
(
Constant
.
CLICK_SPLASH
,
true
)
isAgree
=
true
baseApplication
.
thirdConfig
()
TrackManager
.
getInstance
().
visitorlogin
()
initData
()
...
...
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