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
0bd9bdea
Commit
0bd9bdea
authored
Aug 18, 2023
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
08474b72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
52 deletions
+0
-52
UmengManager.kt
.../main/java/com/duben/happyplaylet/manager/UmengManager.kt
+0
-52
No files found.
video/app/src/main/java/com/duben/happyplaylet/manager/UmengManager.kt
deleted
100644 → 0
View file @
08474b72
package
com.duben.happyplaylet.manager
import
android.app.Application
import
android.content.Context
import
com.duben.happyplaylet.BuildConfig
import
com.duben.happyplaylet.utils.MateUtils
import
com.umeng.analytics.MobclickAgent
import
com.umeng.commonsdk.UMConfigure
object
UmengManager
{
private
val
TAG
=
UmengManager
::
class
.
java
.
simpleName
fun
preInit
(
application
:
Application
,
channel
:
String
)
{
UMConfigure
.
preInit
(
application
,
MateUtils
.
getAppMetaData
(
application
,
"UMENG_KEY"
),
channel
)
}
/**
* 友盟初始化
*/
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
()
}
}
fun
onResume
(
context
:
Context
)
{
MobclickAgent
.
onResume
(
context
)
}
fun
onPause
(
context
:
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