Commit dfb187da by 霍志良

fix:修改ActionDataBean这个的deviceID的获取方法,并增加ydl-platform版本号

parent b26b8de4
...@@ -33,7 +33,7 @@ ext { ...@@ -33,7 +33,7 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.39.43", "ydl-platform" : "0.0.39.46",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.32", "ydl-webview" : "0.0.38.32",
......
...@@ -6,18 +6,25 @@ import android.net.NetworkInfo ...@@ -6,18 +6,25 @@ import android.net.NetworkInfo
import android.net.wifi.WifiManager import android.net.wifi.WifiManager
import android.text.TextUtils import android.text.TextUtils
import android.util.Log import android.util.Log
import com.bun.miitmdid.content.ContextKeeper
import com.google.gson.Gson import com.google.gson.Gson
import com.umeng.analytics.MobclickAgent
import com.ydl.devicesidlib.DemoHelper
import com.ydl.devicesidlib.DeviceIDHelper 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.base.BaseApp
import com.ydl.ydlcommon.data.http.api.ApiRequestUtil import com.ydl.ydlcommon.data.http.api.ApiRequestUtil
import com.ydl.ydlcommon.data.http.params.ActionDataBean import com.ydl.ydlcommon.data.http.params.ActionDataBean
import com.ydl.ydlcommon.data.http.params.BaiduActionDataBean import com.ydl.ydlcommon.data.http.params.BaiduActionDataBean
import com.ydl.ydlcommon.modular.ModularServiceManager 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
import com.ydl.ydlcommon.router.YdlCommonOut.Companion.getChannelName
import com.ydl.ydlcommon.utils.DeviceTool import com.ydl.ydlcommon.utils.DeviceTool
import com.yidianling.common.tools.LogUtil import com.ydl.ydlcommon.utils.YdlBuryPointUtil
import com.yidianling.common.tools.RxDeviceTool import com.yidianling.common.tools.*
import com.yidianling.common.tools.RxTool
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers import io.reactivex.schedulers.Schedulers
import java.net.Inet4Address import java.net.Inet4Address
...@@ -199,11 +206,11 @@ class ActionCountUtils { ...@@ -199,11 +206,11 @@ class ActionCountUtils {
actionDataParams.wifi(if (isWifi()) 0 else 1) actionDataParams.wifi(if (isWifi()) 0 else 1)
actionDataParams.screenWidth(RxDeviceTool.getScreenWidth(RxTool.getContext()!!)) actionDataParams.screenWidth(RxDeviceTool.getScreenWidth(RxTool.getContext()!!))
actionDataParams.screenHeight(RxDeviceTool.getScreenHeight(RxTool.getContext()!!)) actionDataParams.screenHeight(RxDeviceTool.getScreenHeight(RxTool.getContext()!!))
val helper = DemoHelper(DemoHelper.AppIdsUpdater { ids ->
val baiduActionDataParams = BaiduActionDataBean.Builder() val baiduActionDataParams = BaiduActionDataBean.Builder()
baiduActionDataParams.pkname = packageName baiduActionDataParams.pkname = packageName
baiduActionDataParams.deviceType = 2 baiduActionDataParams.deviceType = 2
baiduActionDataParams.deviceId(DeviceIDHelper.getInstance().deviceId) baiduActionDataParams.deviceId(ids)
baiduActionDataParams.convertType(convertType) baiduActionDataParams.convertType(convertType)
baiduActionDataParams.convertTime(System.currentTimeMillis() / 1000) baiduActionDataParams.convertTime(System.currentTimeMillis() / 1000)
baiduActionDataParams.appid(0.toLong()) baiduActionDataParams.appid(0.toLong())
...@@ -215,6 +222,7 @@ class ActionCountUtils { ...@@ -215,6 +222,7 @@ class ActionCountUtils {
baiduActionDataParams.network(DeviceTool.getNetworkState(RxTool.getContext())) baiduActionDataParams.network(DeviceTool.getNetworkState(RxTool.getContext()))
baiduActionDataParams.convertParam("") baiduActionDataParams.convertParam("")
baiduActionDataParams.uid(uid) baiduActionDataParams.uid(uid)
Log.e("baiduActionDataParams", "---------${baiduActionDataParams}")
try { try {
var mac = DeviceTool.getMac(BaseApp.getApp()) var mac = DeviceTool.getMac(BaseApp.getApp())
if (!TextUtils.isEmpty(mac)) { if (!TextUtils.isEmpty(mac)) {
...@@ -236,6 +244,10 @@ class ActionCountUtils { ...@@ -236,6 +244,10 @@ class ActionCountUtils {
//请求 //请求
ActionCountUtils.request(actionDataParams.build()) ActionCountUtils.request(actionDataParams.build())
}, ContextKeeper.getApplicationContext())
helper.getDeviceIds(ContextKeeper.getApplicationContext())
} catch (e: Exception) { } catch (e: Exception) {
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment