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
326e87ad
Commit
326e87ad
authored
Aug 18, 2023
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加第一次打开开屏随机弹出
parent
71b1d6aa
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
29 deletions
+30
-29
build.gradle
video/app/build.gradle
+2
-2
MintsApplication.java
...p/src/main/java/com/mints/helivideo/MintsApplication.java
+7
-6
TalkingDataManager.kt
...in/java/com/mints/helivideo/manager/TalkingDataManager.kt
+2
-2
UmengManager.kt
...src/main/java/com/mints/helivideo/manager/UmengManager.kt
+19
-19
No files found.
video/app/build.gradle
View file @
326e87ad
...
...
@@ -12,8 +12,8 @@ android {
applicationId
"com.mints.helivideo"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
1
1
versionName
"1.1.
0
"
versionCode
1
2
versionName
"1.1.
1
"
flavorDimensions
"default"
// dex突破65535的限制
...
...
video/app/src/main/java/com/mints/helivideo/MintsApplication.java
View file @
326e87ad
...
...
@@ -54,13 +54,12 @@ public class MintsApplication extends MultiDexApplication {
super
.
onCreate
();
mContext
=
this
.
getApplicationContext
();
// 友盟SDK预初始化函数
// preInit预初始化函数耗时极少,不会影响App首次冷启动用户体验
UmengManager
.
INSTANCE
.
preInit
(
this
,
MateUtils
.
INSTANCE
.
getAppMetaData
(
this
,
"CHANNEL_NAME"
));
// // 友盟SDK预初始化函数
// // preInit预初始化函数耗时极少,不会影响App首次冷启动用户体验
// UmengManager.INSTANCE.preInit(this,
// MateUtils.INSTANCE.getAppMetaData(this, "CHANNEL_NAME"));
// 判断应用是否在前台
ForegroundOrBackground
.
init
(
this
);
// 三方配置
thirdConfig
();
...
...
@@ -80,6 +79,8 @@ public class MintsApplication extends MultiDexApplication {
if
(
AppPreferencesManager
.
INSTANCE
.
get
()
.
getBoolean
(
Constant
.
LOAN_PERMISSION_FLAG
,
true
))
return
;
// 判断应用是否在前台
ForegroundOrBackground
.
init
(
this
);
initMiitHelper
();
...
...
video/app/src/main/java/com/mints/helivideo/manager/TalkingDataManager.kt
View file @
326e87ad
...
...
@@ -34,10 +34,10 @@ object TalkingDataManager {
}
fun
onResume
(
cxt
:
Context
,
name
:
String
){
TCAgent
.
onPageStart
(
cxt
,
name
)
//
TCAgent.onPageStart(cxt, name)
}
fun
onPause
(
cxt
:
Context
,
name
:
String
){
TCAgent
.
onPageEnd
(
cxt
,
name
)
//
TCAgent.onPageEnd(cxt, name)
}
}
\ No newline at end of file
video/app/src/main/java/com/mints/helivideo/manager/UmengManager.kt
View file @
326e87ad
...
...
@@ -22,31 +22,31 @@ object UmengManager {
* 友盟初始化
*/
fun
initUm
(
application
:
Application
,
channel
:
String
)
{
try
{
/*
* 参数4:设备类型,必须参数,传参数为UMConfigure.DEVICE_TYPE_PHONE则表示手机;传参数为UMConfigure.DEVICE_TYPE_BOX则表示盒子;默认为手机。
* 参数5:Push推送业务的secret,需要集成Push功能时必须传入Push的secret,否则传空。
*/
UMConfigure
.
init
(
application
,
MateUtils
.
getAppMetaData
(
application
,
"UMENG_KEY"
),
channel
,
UMConfigure
.
DEVICE_TYPE_PHONE
,
""
)
UMConfigure
.
setLogEnabled
(
BuildConfig
.
DEBUG
)
MobclickAgent
.
setPageCollectionMode
(
MobclickAgent
.
PageMode
.
LEGACY_MANUAL
)
}
catch
(
e
:
java
.
lang
.
Exception
)
{
e
.
printStackTrace
()
}
//
try {
//
/*
//
* 参数4:设备类型,必须参数,传参数为UMConfigure.DEVICE_TYPE_PHONE则表示手机;传参数为UMConfigure.DEVICE_TYPE_BOX则表示盒子;默认为手机。
//
* 参数5:Push推送业务的secret,需要集成Push功能时必须传入Push的secret,否则传空。
//
*/
//
UMConfigure.init(
//
application,
//
MateUtils.getAppMetaData(application, "UMENG_KEY"),
//
channel,
//
UMConfigure.DEVICE_TYPE_PHONE,
//
""
//
)
//
UMConfigure.setLogEnabled(BuildConfig.DEBUG)
//
MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.LEGACY_MANUAL)
//
} catch (e: java.lang.Exception) {
//
e.printStackTrace()
//
}
}
fun
onResume
(
context
:
Context
)
{
MobclickAgent
.
onResume
(
context
)
//
MobclickAgent.onResume(context)
}
fun
onPause
(
context
:
Context
)
{
MobclickAgent
.
onPause
(
context
)
//
MobclickAgent.onPause(context)
}
}
\ No newline at end of file
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