Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
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
杨凯
YDL-Component-Medical
Commits
d70ecefb
Commit
d70ecefb
authored
Sep 17, 2020
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:小米手机第一次打开APP获取imei系列号失败的问题。
parent
1ccac573
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
config.gradle
config.gradle
+2
-2
ActionCountUtils.kt
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/actionutil/ActionCountUtils.kt
+14
-1
No files found.
config.gradle
View file @
d70ecefb
...
...
@@ -33,7 +33,7 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform"
:
"0.0.39.5
5
"
,
"ydl-platform"
:
"0.0.39.5
6
"
,
//第二步 若干
"ydl-webview"
:
"0.0.38.32"
,
...
...
@@ -115,7 +115,7 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform"
:
"0.0.39.5
5
"
,
"ydl-platform"
:
"0.0.39.5
6
"
,
//第二步 若干
"ydl-webview"
:
"0.0.38.31"
,
...
...
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/actionutil/ActionCountUtils.kt
View file @
d70ecefb
...
...
@@ -135,8 +135,21 @@ class ActionCountUtils {
actionDataParams
.
os
(
BIConstants
.
OS
)
actionDataParams
.
osVersion
(
android
.
os
.
Build
.
VERSION
.
RELEASE
)
actionDataParams
.
wifi
(
if
(
isWifi
())
0
else
1
)
val
deviceId
=
var
deviceId
=
""
/*
* 因为DeviceIDHelper.getInstance().deviceId对于imei
* 序列号对于小米手机Utils.getIMEI(context)
* 第一次安装获取失败,第二次打开就能成功
* 所以Utils.getIMEI(topTaskActivity)传入activity解决这个问题
* */
deviceId
=
if
(
Build
.
VERSION
.
SDK_INT
<=
Build
.
VERSION_CODES
.
P
)
{
val
topTaskActivity
=
ActivityManager
.
getInstance
().
getTopTaskActivity
()
//获取imei
Utils
.
getIMEI
(
topTaskActivity
)
}
else
{
//android Q及以上取oaid
DeviceIDHelper
.
getInstance
().
deviceId
}
actionDataParams
.
deviceId
(
deviceId
)
signs
==
null
?:
signs
.
forEachIndexed
{
index
,
s
->
//拓展参数个数确定,暂不使用反射调用
...
...
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