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
6eada0c7
Commit
6eada0c7
authored
Aug 17, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
356fd38e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
27 deletions
+27
-27
MintsApplication.java
...rc/main/java/com/duben/happyplaylet/MintsApplication.java
+9
-9
TalkingDataManager.kt
...java/com/duben/happyplaylet/manager/TalkingDataManager.kt
+18
-18
No files found.
video/app/src/main/java/com/duben/happyplaylet/MintsApplication.java
View file @
6eada0c7
...
...
@@ -54,13 +54,11 @@ 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 +78,8 @@ public class MintsApplication extends MultiDexApplication {
if
(
AppPreferencesManager
.
INSTANCE
.
get
()
.
getBoolean
(
Constant
.
LOAN_PERMISSION_FLAG
,
true
))
return
;
// 判断应用是否在前台
ForegroundOrBackground
.
init
(
this
);
initMiitHelper
();
...
...
@@ -87,7 +87,7 @@ public class MintsApplication extends MultiDexApplication {
TXCSDKService
.
init
(
this
);
TalkingDataManager
.
INSTANCE
.
init
(
this
);
//
TalkingDataManager.INSTANCE.init(this);
// PR下载附件
initPRDownloader
();
...
...
@@ -95,8 +95,8 @@ public class MintsApplication extends MultiDexApplication {
//logger
BindLogger
();
UmengManager
.
INSTANCE
.
initUm
(
this
,
MateUtils
.
INSTANCE
.
getAppMetaData
(
this
,
"CHANNEL_NAME"
));
//
UmengManager.INSTANCE.initUm(this,
//
MateUtils.INSTANCE.getAppMetaData(this, "CHANNEL_NAME"));
// bugly
CrashReport
.
initCrashReport
(
this
,
"d035276c5b"
,
BuildConfig
.
DEBUG
);
...
...
video/app/src/main/java/com/duben/happyplaylet/manager/TalkingDataManager.kt
View file @
6eada0c7
...
...
@@ -15,29 +15,29 @@ object TalkingDataManager {
fun
init
(
application
:
Application
)
{
try
{
//打开日志
TCAgent
.
LOG_ON
=
BuildConfig
.
LOG_DEBUG
/**
* 动态获取渠道ID(类似友盟)
* AppID说是xml文件里的密钥?
*/
TCAgent
.
init
(
application
,
APP_KEY
,
MateUtils
.
getAppMetaData
(
application
,
"CHANNEL_NAME"
))
/**
* true-开启自动捕获错误
*/
TCAgent
.
setReportUncaughtExceptions
(
true
)
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
//
try {
//
//打开日志
//
TCAgent.LOG_ON = BuildConfig.LOG_DEBUG
//
/**
//
* 动态获取渠道ID(类似友盟)
//
* AppID说是xml文件里的密钥?
//
*/
//
TCAgent.init(application, APP_KEY
//
, MateUtils.getAppMetaData(application, "CHANNEL_NAME"))
//
/**
//
* true-开启自动捕获错误
//
*/
//
TCAgent.setReportUncaughtExceptions(true)
//
} catch (e: Exception) {
//
e.printStackTrace()
//
}
}
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
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