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
dfb187da
Commit
dfb187da
authored
Aug 12, 2020
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修改ActionDataBean这个的deviceID的获取方法,并增加ydl-platform版本号
parent
b26b8de4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
35 deletions
+47
-35
config.gradle
config.gradle
+1
-1
ActionCountUtils.kt
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/actionutil/ActionCountUtils.kt
+46
-34
No files found.
config.gradle
View file @
dfb187da
...
...
@@ -33,7 +33,7 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform"
:
"0.0.39.4
3
"
,
"ydl-platform"
:
"0.0.39.4
6
"
,
//第二步 若干
"ydl-webview"
:
"0.0.38.32"
,
...
...
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/actionutil/ActionCountUtils.kt
View file @
dfb187da
...
...
@@ -6,18 +6,25 @@ import android.net.NetworkInfo
import
android.net.wifi.WifiManager
import
android.text.TextUtils
import
android.util.Log
import
com.bun.miitmdid.content.ContextKeeper
import
com.google.gson.Gson
import
com.umeng.analytics.MobclickAgent
import
com.ydl.devicesidlib.DemoHelper
import
com.ydl.devicesidlib.DeviceIDHelper
import
com.ydl.pushserver.pushagent.YdlPushAgent
import
com.ydl.pushserver.pushagent.common.listener.IYDLPushListener
import
com.ydl.pushserver.pushagent.network.pack.RegisterEventBean
import
com.ydl.ydlcommon.base.BaseApp
import
com.ydl.ydlcommon.data.http.api.ApiRequestUtil
import
com.ydl.ydlcommon.data.http.params.ActionDataBean
import
com.ydl.ydlcommon.data.http.params.BaiduActionDataBean
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.modular.ModularServiceManager.getPlatformUserService
import
com.ydl.ydlcommon.router.YdlCommonOut
import
com.ydl.ydlcommon.router.YdlCommonOut.Companion.getChannelName
import
com.ydl.ydlcommon.utils.DeviceTool
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.common.tools.RxDeviceTool
import
com.yidianling.common.tools.RxTool
import
com.ydl.ydlcommon.utils.YdlBuryPointUtil
import
com.yidianling.common.tools.*
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.schedulers.Schedulers
import
java.net.Inet4Address
...
...
@@ -199,42 +206,47 @@ class ActionCountUtils {
actionDataParams
.
wifi
(
if
(
isWifi
())
0
else
1
)
actionDataParams
.
screenWidth
(
RxDeviceTool
.
getScreenWidth
(
RxTool
.
getContext
()
!!
))
actionDataParams
.
screenHeight
(
RxDeviceTool
.
getScreenHeight
(
RxTool
.
getContext
()
!!
))
val
helper
=
DemoHelper
(
DemoHelper
.
AppIdsUpdater
{
ids
->
val
baiduActionDataParams
=
BaiduActionDataBean
.
Builder
()
baiduActionDataParams
.
pkname
=
packageName
baiduActionDataParams
.
deviceType
=
2
baiduActionDataParams
.
deviceId
(
ids
)
baiduActionDataParams
.
convertType
(
convertType
)
baiduActionDataParams
.
convertTime
(
System
.
currentTimeMillis
()
/
1000
)
baiduActionDataParams
.
appid
(
0
.
toLong
())
baiduActionDataParams
.
appName
(
appName
)
baiduActionDataParams
.
androidId
(
DeviceTool
.
getAndroidID
())
baiduActionDataParams
.
ip
(
""
)
baiduActionDataParams
.
ipv6
(
""
)
baiduActionDataParams
.
tp
(
android
.
os
.
Build
.
MODEL
)
baiduActionDataParams
.
network
(
DeviceTool
.
getNetworkState
(
RxTool
.
getContext
()))
baiduActionDataParams
.
convertParam
(
""
)
baiduActionDataParams
.
uid
(
uid
)
Log
.
e
(
"baiduActionDataParams"
,
"---------${baiduActionDataParams}"
)
try
{
var
mac
=
DeviceTool
.
getMac
(
BaseApp
.
getApp
())
if
(!
TextUtils
.
isEmpty
(
mac
))
{
mac
=
mac
.
replace
(
":"
,
""
)
}
com
.
ydl
.
ydlcommon
.
utils
.
LogUtil
.
d
(
"MAC=${mac}"
)
baiduActionDataParams
.
mac
(
mac
)
}
catch
(
e
:
Exception
)
{
val
baiduActionDataParams
=
BaiduActionDataBean
.
Builder
()
baiduActionDataParams
.
pkname
=
packageName
baiduActionDataParams
.
deviceType
=
2
baiduActionDataParams
.
deviceId
(
DeviceIDHelper
.
getInstance
().
deviceId
)
baiduActionDataParams
.
convertType
(
convertType
)
baiduActionDataParams
.
convertTime
(
System
.
currentTimeMillis
()
/
1000
)
baiduActionDataParams
.
appid
(
0
.
toLong
())
baiduActionDataParams
.
appName
(
appName
)
baiduActionDataParams
.
androidId
(
DeviceTool
.
getAndroidID
())
baiduActionDataParams
.
ip
(
""
)
baiduActionDataParams
.
ipv6
(
""
)
baiduActionDataParams
.
tp
(
android
.
os
.
Build
.
MODEL
)
baiduActionDataParams
.
network
(
DeviceTool
.
getNetworkState
(
RxTool
.
getContext
()))
baiduActionDataParams
.
convertParam
(
""
)
baiduActionDataParams
.
uid
(
uid
)
try
{
var
mac
=
DeviceTool
.
getMac
(
BaseApp
.
getApp
())
if
(!
TextUtils
.
isEmpty
(
mac
))
{
mac
=
mac
.
replace
(
":"
,
""
)
}
com
.
ydl
.
ydlcommon
.
utils
.
LogUtil
.
d
(
"MAC=${mac}"
)
baiduActionDataParams
.
mac
(
mac
)
}
catch
(
e
:
Exception
)
{
baiduActionDataParams
.
channel
(
YdlCommonOut
.
getChannelName
())
val
gson
=
Gson
().
toJson
(
baiduActionDataParams
)
Log
.
e
(
"Action"
,
"---------$gson"
)
actionDataParams
.
sign2
(
gson
)
actionDataParams
.
sign3
(
YdlCommonOut
.
getChannelName
())
}
baiduActionDataParams
.
channel
(
YdlCommonOut
.
getChannelName
())
val
gson
=
Gson
().
toJson
(
baiduActionDataParams
)
Log
.
e
(
"Action"
,
"---------$gson"
)
actionDataParams
.
sign2
(
gson
)
actionDataParams
.
sign3
(
YdlCommonOut
.
getChannelName
())
//剩余额外参数根据需求定义
//剩余额外参数根据需求定义
//请求
ActionCountUtils
.
request
(
actionDataParams
.
build
())
},
ContextKeeper
.
getApplicationContext
())
helper
.
getDeviceIds
(
ContextKeeper
.
getApplicationContext
())
//请求
ActionCountUtils
.
request
(
actionDataParams
.
build
())
}
catch
(
e
:
Exception
)
{
}
...
...
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