Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
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
bp
ShenghuoquanBusiness
Commits
5b9a93c7
Commit
5b9a93c7
authored
Aug 09, 2021
by
shiyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加渠道名称
parent
2c500e02
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
19 deletions
+6
-19
AppConfig.kt
...on/src/main/java/com/yidian/bcommon/constant/AppConfig.kt
+2
-5
UMConfigUtils.kt
...n/src/main/java/com/yidian/bcommon/utils/UMConfigUtils.kt
+4
-14
No files found.
CommonLib/BCommon/src/main/java/com/yidian/bcommon/constant/AppConfig.kt
View file @
5b9a93c7
...
...
@@ -81,20 +81,17 @@ class AppConfig {
// 友盟测试环境配置
const
val
UMAppTestKey
=
"60c8479fe044530ff0a49936"
//umeng统计key注释
const
val
UMTestChannel
=
"ANDROID_CHANNEL"
const
val
UMTestType
=
"metro"
const
val
UMTestChannel
=
"android_test"
const
val
UMTestPushSecret
=
"e78446e86d153e2891ae7523e1532f13"
// push secret
// 友盟线上环境配置
const
val
UMAppKey
=
"60ccc0c68a102159db70438c"
//umeng统计key注释
const
val
UMChannel
=
"ANDROID_CHANNEL"
const
val
UMType
=
"metro"
const
val
UMChannel
=
"android_prod"
const
val
UMPushSecret
=
"27ac72f77ef4ff6593cca8be3069ecd0"
// push secret
const
val
PUSH_XIAOMI_SUPPORT_MASK
=
0
x40000000
const
val
PUSH_UMENG_SUPPORT_MASK
=
0
x20000000
const
val
PUSH_GETUI_SUPPORT_MASK
=
0
x10000000
const
val
PUSH_PASS_THROGH_UNIQUE_MASK
=
0
x00000001
const
val
ZIXUN_PUSH_LEVEL
=
PUSH_XIAOMI_SUPPORT_MASK
const
val
PUSH_LEVEL
=
(
PUSH_XIAOMI_SUPPORT_MASK
or
PUSH_UMENG_SUPPORT_MASK
or
PUSH_GETUI_SUPPORT_MASK
or
PUSH_PASS_THROGH_UNIQUE_MASK
)
...
...
CommonLib/BCommon/src/main/java/com/yidian/bcommon/utils/UMConfigUtils.kt
View file @
5b9a93c7
...
...
@@ -6,9 +6,9 @@ import com.umeng.analytics.MobclickAgent
import
com.umeng.commonsdk.UMConfigure
import
com.umeng.message.entity.UMessage
import
com.yidian.bcommon.constant.AppConfig
import
com.yidian.bcommon.BuildConfig
import
com.yidian.bcommon.constant.RunConfig
import
com.yidian.bcommon.constant.XRouterPathConstants
import
com.yidian.xarc.xbase.utils.ChannelUtil
import
com.yidian.xpage.XPageManager
...
...
@@ -18,24 +18,14 @@ import com.yidian.xpage.XPageManager
class
UMConfigUtils
{
companion
object
{
// /**
// * 预初始化
// */
// fun preInit(context: Context) {
// if (RunConfig.IS_UMENG_RELEASE) {
// UMConfigure.preInit(context, AppConfig.UMAppKey, AppConfig.UMChannel)
// } else {
// UMConfigure.preInit(context, AppConfig.UMAppTestKey, AppConfig.UMTestChannel)
// }
// }
/**
* 正式初始化
*/
fun
init
(
context
:
Context
)
{
//release环境上报错误信息,参数有:上下文、APP
k
ey、渠道号、设备类型、推送密钥
//release环境上报错误信息,参数有:上下文、APP
K
ey、渠道号、设备类型、推送密钥
if
(
RunConfig
.
IS_UMENG_RELEASE
)
{
UMConfigure
.
init
(
context
,
AppConfig
.
UMAppKey
,
AppConfig
.
UMChannel
,
UMConfigure
.
DEVICE_TYPE_PHONE
,
AppConfig
.
UMPushSecret
)
val
channelValue
=
ChannelUtil
.
getChannelFromApk
(
context
,
"channel"
)
UMConfigure
.
init
(
context
,
AppConfig
.
UMAppKey
,
channelValue
,
UMConfigure
.
DEVICE_TYPE_PHONE
,
AppConfig
.
UMPushSecret
)
}
else
{
UMConfigure
.
init
(
context
,
...
...
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