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
b26b8de4
Commit
b26b8de4
authored
Aug 11, 2020
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复部分手机获取ID的问题,更新deviceID 组件到0.0.22版本
parent
2f12450b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
45 deletions
+50
-45
config.gradle
config.gradle
+2
-2
.gitignore
ydl-platform/.gitignore
+1
-0
YdlRepository.kt
ydl-platform/src/main/java/com/ydl/ydlcommon/app/YdlRepository.kt
+2
-3
YdlBuryPointUtil.java
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/YdlBuryPointUtil.java
+45
-40
No files found.
config.gradle
View file @
b26b8de4
...
...
@@ -33,7 +33,7 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform"
:
"0.0.39.4
2
"
,
"ydl-platform"
:
"0.0.39.4
3
"
,
//第二步 若干
"ydl-webview"
:
"0.0.38.32"
,
...
...
@@ -263,7 +263,7 @@ ext {
"protector"
:
"com.ydl:protector:1.0.1-SNAPSHOT@aar"
,
"ydl-hnet"
:
"com.ydl:h-net:0.0.8"
,
"ydl-user-router"
:
"com.ydl:router:1.0.0-SNAPSHOT@aar"
,
"ydl-device"
:
"com.ydl:device-id:0.0.
10
@aar"
,
"ydl-device"
:
"com.ydl:device-id:0.0.
22
@aar"
,
"ydl-net"
:
"com.ydl:ydl-net:${ydlCompileVersion["
ydl
-
net
"]}"
,
"ydl-utils"
:
"com.ydl:ydl-utils:${ydlCompileVersion["
ydl
-
utils
"]}"
,
...
...
ydl-platform/.gitignore
View file @
b26b8de4
/build
/.idea/
ydl-platform/src/main/java/com/ydl/ydlcommon/app/YdlRepository.kt
View file @
b26b8de4
...
...
@@ -4,7 +4,6 @@ import android.annotation.SuppressLint
import
android.app.Application
import
android.os.Build
import
com.alibaba.android.arouter.launcher.ARouter
import
com.bun.miitmdid.core.JLibrary
import
com.ydl.devicesidlib.DeviceIDHelper
import
com.ydl.ydlcommon.base.BaseApp
import
com.ydl.ydlcommon.data.http.UpLoadLogUtils
...
...
@@ -29,10 +28,10 @@ object YdlRepository {
// 需要在主 module 的 application 的 onCreate 方法中调用此方法
fun
initApp
(
app
:
Application
,
isDebug
:
Boolean
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
P
)
{
JLibrary
.
InitEntry
(
app
)
//
JLibrary.InitEntry(app)
}
if
(
AppProgressUtils
.
isMainProcess
(
app
)){
DeviceIDHelper
.
getInstance
().
init
(
app
.
applicationContext
)
//
DeviceIDHelper.getInstance().init(app.applicationContext)
}
LogHelper
.
getInstance
().
deleteExpireLogSync
()
LogUtil
.
debug
=
BaseApp
.
instance
.
getGlobalConfig
().
appDebug
...
...
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/YdlBuryPointUtil.java
View file @
b26b8de4
package
com
.
ydl
.
ydlcommon
.
utils
;
import
android.content.Context
;
import
android.util.Log
;
import
com.umeng.analytics.MobclickAgent
;
import
com.ydl.burypointlib.BuryPointHelper
;
import
com.ydl.devicesidlib.DemoHelper
;
import
com.ydl.devicesidlib.DeviceIDHelper
;
import
com.ydl.pushserver.pushagent.YdlPushAgent
;
import
com.ydl.pushserver.pushagent.common.listener.IYDLPushListener
;
...
...
@@ -15,6 +17,8 @@ import com.ydl.ydlcommon.router.YdlCommonOut;
import
com.yidianling.common.tools.RxAppTool
;
import
com.yidianling.common.tools.RxDeviceTool
;
import
com.yidianling.common.tools.RxNetTool
;
import
static
com
.
bun
.
miitmdid
.
content
.
ContextKeeper
.
getApplicationContext
;
//import com.ydl.burypointlib.BuryPointHelper;
//埋点工具类
...
...
@@ -36,47 +40,48 @@ public class YdlBuryPointUtil {
if
(
isTest
){
YdlPushAgent
.
setDebugAdree
(
"121.41.92.140"
,
8091
);
}
RegisterEventBean
registerEventBean
=
new
RegisterEventBean
();
registerEventBean
.
setAppId
(
context
.
getPackageName
());
registerEventBean
.
setAppVersion
(
RxAppTool
.
getAppVersionName
(
context
));
String
deviceId
=
DeviceIDHelper
.
getInstance
().
getDeviceId
();
registerEventBean
.
setDeviceId
(
deviceId
);
registerEventBean
.
setManufacturer
(
RxDeviceTool
.
getBuildMANUFACTURER
());
registerEventBean
.
setChannel
(
YdlCommonOut
.
Companion
.
getChannelName
());
registerEventBean
.
setOs
(
"Android"
);
registerEventBean
.
setModel
(
RxDeviceTool
.
getBuildBrandModel
());
registerEventBean
.
setOsVersion
(
RxDeviceTool
.
getOsBuileVersion
());
registerEventBean
.
setUid
(
ModularServiceManager
.
INSTANCE
.
getPlatformUserService
().
getUser
().
getUserId
()+
""
);
registerEventBean
.
setScreenHeight
(
RxDeviceTool
.
getScreenHeight
(
context
));
registerEventBean
.
setScreenWidth
(
RxDeviceTool
.
getScreenWidth
(
context
));
registerEventBean
.
setWifi
(
RxNetTool
.
getNetWorkTypeName
(
context
));
LogUtil
.
d
(
registerEventBean
.
toString
());
YdlPushAgent
.
init
(
registerEventBean
,
appDebug
,
context1
,
new
IYDLPushListener
()
{
@Override
public
void
onPushEvent
()
{
MobclickAgent
.
onEvent
(
context1
,
"socket_push_event"
);
}
@Override
public
void
onPushRescueEvent
()
{
MobclickAgent
.
onEvent
(
context1
,
"socket_push_rescue_event"
);
DemoHelper
helper
=
new
DemoHelper
(
new
DemoHelper
.
AppIdsUpdater
()
{
@Override
public
void
OnIdsAvalid
(
String
ids
)
{
Log
.
e
(
"AAAA"
,
"getDeviceId:"
+
ids
);
RegisterEventBean
registerEventBean
=
new
RegisterEventBean
();
registerEventBean
.
setAppId
(
context
.
getPackageName
());
registerEventBean
.
setAppVersion
(
RxAppTool
.
getAppVersionName
(
context
));
// String deviceId = DeviceIDHelper.getInstance().getDeviceId();
registerEventBean
.
setDeviceId
(
ids
);
registerEventBean
.
setManufacturer
(
RxDeviceTool
.
getBuildMANUFACTURER
());
registerEventBean
.
setChannel
(
YdlCommonOut
.
Companion
.
getChannelName
());
registerEventBean
.
setOs
(
"Android"
);
registerEventBean
.
setModel
(
RxDeviceTool
.
getBuildBrandModel
());
registerEventBean
.
setOsVersion
(
RxDeviceTool
.
getOsBuileVersion
());
registerEventBean
.
setUid
(
ModularServiceManager
.
INSTANCE
.
getPlatformUserService
().
getUser
().
getUserId
()+
""
);
registerEventBean
.
setScreenHeight
(
RxDeviceTool
.
getScreenHeight
(
context
));
registerEventBean
.
setScreenWidth
(
RxDeviceTool
.
getScreenWidth
(
context
));
registerEventBean
.
setWifi
(
RxNetTool
.
getNetWorkTypeName
(
context
));
LogUtil
.
d
(
registerEventBean
.
toString
());
YdlPushAgent
.
init
(
registerEventBean
,
appDebug
,
context1
,
new
IYDLPushListener
()
{
@Override
public
void
onPushEvent
()
{
MobclickAgent
.
onEvent
(
context1
,
"socket_push_event"
);
}
@Override
public
void
onPushRescueEvent
()
{
MobclickAgent
.
onEvent
(
context1
,
"socket_push_rescue_event"
);
}
@Override
public
void
onSocketReconnect
()
{
MobclickAgent
.
onEvent
(
context1
,
"socket_reconnect"
);
}
@Override
public
void
onSocketDisconnect
()
{
MobclickAgent
.
onEvent
(
context1
,
"socket_disconnect"
);
}
});
}
@Override
public
void
onSocketReconnect
()
{
MobclickAgent
.
onEvent
(
context1
,
"socket_reconnect"
);
}
@Override
public
void
onSocketDisconnect
()
{
MobclickAgent
.
onEvent
(
context1
,
"socket_disconnect"
);
}
});
},
getApplicationContext
());
helper
.
getDeviceIds
(
getApplicationContext
());
BuryPointHelper
.
setDebug
(
isTest
,
isEditAlis
,
true
,
appDebug
);
BuryPointHelper
.
init
();
...
...
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