Commit 8c78f6d9 by 霍志良

feat:

parent f06b463f
...@@ -10,7 +10,7 @@ ext { ...@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.30.00", "m-fm" : "0.0.30.00",
"m-user" : "0.0.60.25", "m-user" : "0.0.60.25",
"m-home" : "0.0.22.31", "m-home" : "0.0.22.31",
"m-im" : "0.0.18.15", "m-im" : "0.0.18.16",
"m-dynamic" : "0.0.7.13", "m-dynamic" : "0.0.7.13",
"m-article" : "0.0.0.6", "m-article" : "0.0.0.6",
...@@ -33,10 +33,11 @@ ext { ...@@ -33,10 +33,11 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.39.49", "ydl-platform" : "0.0.39.52",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.32", "ydl-webview" : "0.0.38.32",
"ydl-webview" : "0.0.38.32",
"ydl-media" : "0.0.21.6", "ydl-media" : "0.0.21.6",
"ydl-pay" : "0.0.18.9", "ydl-pay" : "0.0.18.9",
"m-audioim" : "0.0.49.29.7", "m-audioim" : "0.0.49.29.7",
...@@ -93,7 +94,7 @@ ext { ...@@ -93,7 +94,7 @@ ext {
"m-fm" : "0.0.23.5", "m-fm" : "0.0.23.5",
"m-user" : "0.0.41.4", "m-user" : "0.0.41.4",
"m-home" : "0.0.6.26", "m-home" : "0.0.6.26",
"m-im" : "0.0.3.9", "m-im" : "0.0.3.10",
"m-dynamic" : "0.0.1.7", "m-dynamic" : "0.0.1.7",
"m-muse" : "0.0.20.7", "m-muse" : "0.0.20.7",
...@@ -114,7 +115,7 @@ ext { ...@@ -114,7 +115,7 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.39.49", "ydl-platform" : "0.0.39.52",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.31", "ydl-webview" : "0.0.38.31",
...@@ -263,7 +264,7 @@ ext { ...@@ -263,7 +264,7 @@ ext {
"protector" : "com.ydl:protector:1.0.1-SNAPSHOT@aar", "protector" : "com.ydl:protector:1.0.1-SNAPSHOT@aar",
"ydl-hnet" : "com.ydl:h-net:0.0.8", "ydl-hnet" : "com.ydl:h-net:0.0.8",
"ydl-user-router" : "com.ydl:router:1.0.0-SNAPSHOT@aar", "ydl-user-router" : "com.ydl:router:1.0.0-SNAPSHOT@aar",
"ydl-device" : "com.ydl:device-id:0.0.25@aar", "ydl-device" : "com.ydl:device-id:0.0.10@aar",//0.0.27
"ydl-net" : "com.ydl:ydl-net:${ydlCompileVersion["ydl-net"]}", "ydl-net" : "com.ydl:ydl-net:${ydlCompileVersion["ydl-net"]}",
"ydl-utils" : "com.ydl:ydl-utils:${ydlCompileVersion["ydl-utils"]}", "ydl-utils" : "com.ydl:ydl-utils:${ydlCompileVersion["ydl-utils"]}",
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yidianling.im" package="com.yidianling.im"
android:installLocation="auto"> android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.FLASHLIGHT" /> <uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.CAMERA"/> <uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/> <uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/> <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.BROADCAST_STICKY"/> <uses-permission android:name="android.permission.BROADCAST_STICKY"/>
<uses-feature android:name="android.hardware.camera" /> <uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" /> <uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" /> <uses-feature android:glEsVersion="0x00020000" android:required="true" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<permission <permission
android:name="${APPLICATIONID}.permission.RECEIVE_MSG" android:name="${APPLICATIONID}.permission.RECEIVE_MSG"
android:protectionLevel="signature" /> android:protectionLevel="signature" />
<uses-permission android:name="${APPLICATIONID}.permission.RECEIVE_MSG" /> <uses-permission android:name="${APPLICATIONID}.permission.RECEIVE_MSG" />
<application> <application>
<receiver android:name="com.netease.nimlib.mixpush.hw.HWPushReceiver"> <!--<receiver android:name="com.netease.nimlib.mixpush.hw.HWPushReceiver">
<intent-filter> <intent-filter>
<action android:name="com.huawei.android.push.intent.REGISTRATION" /> <action android:name="com.huawei.android.push.intent.REGISTRATION" />
<action android:name="com.huawei.android.push.intent.RECEIVE" /> <action android:name="com.huawei.android.push.intent.RECEIVE" />
<action android:name="com.huawei.android.push.intent.CLICK" /> <action android:name="com.huawei.android.push.intent.CLICK" />
<action android:name="com.huawei.intent.action.PUSH_STATE" /> <action android:name="com.huawei.intent.action.PUSH_STATE" />
</intent-filter> </intent-filter>
<meta-data <meta-data
android:name="CS_cloud_ablitity" android:name="CS_cloud_ablitity"
android:value="successRateAnalytics" /> android:value="successRateAnalytics" />
</receiver> </receiver>-->
<!-- ==================== IM ==================== --> <!-- ==================== IM ==================== -->
<!-- ==================== IM ==================== --> <!-- ==================== IM ==================== -->
<!-- ==================== IM ==================== --> <!-- ==================== IM ==================== -->
<meta-data <meta-data
android:name="com.netease.nim.appKey" android:name="com.netease.nim.appKey"
android:value="4e258ba5cdf489fa188274ebf0fb5669" /> android:value="4e258ba5cdf489fa188274ebf0fb5669" />
<!-- 全面屏配置 --> <!-- 全面屏配置 -->
<meta-data <meta-data
android:name="android.max_aspect" android:name="android.max_aspect"
android:value="2.1" /> android:value="2.1" />
<activity <activity
android:name=".ui.activity.SystemMsgDetailActivity" android:name=".ui.activity.SystemMsgDetailActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" android:theme="@style/platform_NoTitleTheme"
/> />
<activity <activity
android:name=".ui.activity.OtherMsgDetailActivity" android:name=".ui.activity.OtherMsgDetailActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" android:theme="@style/platform_NoTitleTheme"
/> />
<!-- 云信 集成配置 --> <!-- 云信 集成配置 -->
<!-- 声明云信后台服务 --> <!-- 声明云信后台服务 -->
<service <service
android:name="com.netease.nimlib.service.NimService" android:name="com.netease.nimlib.service.NimService"
android:process=":core" /> android:process=":core" />
<!-- 运行后台辅助服务 --> <!-- 运行后台辅助服务 -->
<service <service
android:name="com.netease.nimlib.service.NimService$Aux" android:name="com.netease.nimlib.service.NimService$Aux"
android:process=":core" /> android:process=":core" />
<!-- 声明云信后台辅助服务 --> <!-- 声明云信后台辅助服务 -->
<service <service
android:name="com.netease.nimlib.job.NIMJobService" android:name="com.netease.nimlib.job.NIMJobService"
android:exported="true" android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE" android:permission="android.permission.BIND_JOB_SERVICE"
android:process=":core" /> android:process=":core" />
<!-- 云信SDK的监视系统启动和网络变化的广播接收器,用户开机自启动以及网络变化时候重新登录 --> <!-- 云信SDK的监视系统启动和网络变化的广播接收器,用户开机自启动以及网络变化时候重新登录 -->
<receiver <receiver
android:name="com.netease.nimlib.service.NimReceiver" android:name="com.netease.nimlib.service.NimReceiver"
android:exported="false" android:exported="false"
android:process=":core"> android:process=":core">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" /> <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter> </intent-filter>
</receiver> </receiver>
<!-- 云信进程间通信receiver --> <!-- 云信进程间通信receiver -->
<receiver android:name="com.netease.nimlib.service.ResponseReceiver" /> <receiver android:name="com.netease.nimlib.service.ResponseReceiver" />
<!-- 云信进程间通信service --> <!-- 云信进程间通信service -->
<service android:name="com.netease.nimlib.service.ResponseService" /> <service android:name="com.netease.nimlib.service.ResponseService" />
<!-- 云信进程间通信provider --> <!-- 云信进程间通信provider -->
<!-- android:authorities="{包名}.ipc.provider", 请将com.yidianling.im替换为自己的包名 --> <!-- android:authorities="{包名}.ipc.provider", 请将com.yidianling.im替换为自己的包名 -->
<provider <provider
android:name="com.netease.nimlib.ipc.NIMContentProvider" android:name="com.netease.nimlib.ipc.NIMContentProvider"
android:authorities="${APPLICATIONID}.ipc.provider" android:authorities="${APPLICATIONID}.ipc.provider"
android:exported="false" android:exported="false"
android:process=":core" /> android:process=":core" />
<!-- ====================IM - AvChat==================== --> <!-- ====================IM - AvChat==================== -->
<!-- ====================IM - AvChat==================== --> <!-- ====================IM - AvChat==================== -->
<!-- ====================IM - AvChat==================== --> <!-- ====================IM - AvChat==================== -->
<activity <activity
android:name="com.yidianling.avchatkit.activity.AVChatActivity" android:name="com.yidianling.avchatkit.activity.AVChatActivity"
android:launchMode="singleInstance" android:launchMode="singleInstance"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/FullScreenTheme" android:theme="@style/FullScreenTheme"
android:windowSoftInputMode="stateAlwaysHidden" /> android:windowSoftInputMode="stateAlwaysHidden" />
<!-- 音视频 --> <!-- 音视频 -->
<activity <activity
android:name="com.yidianling.avchatkit.teamavchat.activity.TeamAVChatActivity" android:name="com.yidianling.avchatkit.teamavchat.activity.TeamAVChatActivity"
android:launchMode="singleInstance" android:launchMode="singleInstance"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/FullScreenTheme" android:theme="@style/FullScreenTheme"
android:windowSoftInputMode="stateAlwaysHidden" /> android:windowSoftInputMode="stateAlwaysHidden" />
<!-- 申明本地电话状态(通话状态)的广播接收器,第三方APP集成时音视频模块时,如果需要在App中处理网络通话与本地电话的交互请加上此接收器 --> <!-- 申明本地电话状态(通话状态)的广播接收器,第三方APP集成时音视频模块时,如果需要在App中处理网络通话与本地电话的交互请加上此接收器 -->
<receiver android:name="com.yidianling.avchatkit.receiver.IncomingCallReceiver"> <receiver android:name="com.yidianling.avchatkit.receiver.IncomingCallReceiver">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.PHONE_STATE" /> <action android:name="android.intent.action.PHONE_STATE" />
</intent-filter> </intent-filter>
</receiver> </receiver>
<!-- ====================IM - UIKit==================== --> <!-- ====================IM - UIKit==================== -->
<!-- ====================IM - UIKit==================== --> <!-- ====================IM - UIKit==================== -->
<!-- ====================IM - UIKit==================== --> <!-- ====================IM - UIKit==================== -->
<activity <activity
android:name="com.yidianling.uikit.business.session.activity.YDLP2PMessageActivity" android:name="com.yidianling.uikit.business.session.activity.YDLP2PMessageActivity"
android:configChanges="keyboardHidden|orientation" android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" /> android:windowSoftInputMode="stateHidden|adjustResize" />
<activity <activity
android:name="com.yidianling.uikit.business.session.activity.YDLTeamMessageActivity" android:name="com.yidianling.uikit.business.session.activity.YDLTeamMessageActivity"
android:configChanges="keyboardHidden|orientation" android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" /> android:windowSoftInputMode="stateHidden|adjustResize" />
<!-- 群聊 --> <!-- 群聊 -->
<activity <activity
android:name="com.yidianling.uikit.business.team.activity.NormalTeamInfoActivity" android:name="com.yidianling.uikit.business.team.activity.NormalTeamInfoActivity"
android:configChanges="keyboardHidden|orientation" android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" /> android:windowSoftInputMode="stateHidden|adjustResize" />
<activity <activity
android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamInfoActivity" android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamInfoActivity"
android:configChanges="keyboardHidden|orientation" android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" /> android:windowSoftInputMode="stateHidden|adjustResize" />
<activity <activity
android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamMemberActivity" android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamMemberActivity"
android:configChanges="keyboardHidden|orientation" android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" /> android:windowSoftInputMode="stateHidden|adjustResize" />
<activity <activity
android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamAnnounceActivity" android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamAnnounceActivity"
android:configChanges="keyboardHidden|orientation" android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" /> android:windowSoftInputMode="stateHidden|adjustResize" />
<activity <activity
android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamMemberInfoActivity" android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamMemberInfoActivity"
android:configChanges="keyboardHidden|orientation" android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" /> android:windowSoftInputMode="stateHidden|adjustResize" />
<activity <activity
android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamNicknameActivity" android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamNicknameActivity"
android:configChanges="keyboardHidden|orientation" android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" /> android:windowSoftInputMode="stateHidden|adjustResize" />
<activity <activity
android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamCreateAnnounceActivity" android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamCreateAnnounceActivity"
android:configChanges="keyboardHidden|orientation" android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" /> android:windowSoftInputMode="stateHidden|adjustResize" />
<activity <activity
android:name="com.yidianling.uikit.business.team.activity.TeamPropertySettingActivity" android:name="com.yidianling.uikit.business.team.activity.TeamPropertySettingActivity"
android:configChanges="keyboardHidden|orientation" android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" /> android:windowSoftInputMode="stateHidden|adjustResize" />
<!-- 联系人选择器 --> <!-- 联系人选择器 -->
<activity <activity
android:name="com.yidianling.uikit.business.contact.selector.activity.ContactSelectActivity" android:name="com.yidianling.uikit.business.contact.selector.activity.ContactSelectActivity"
android:configChanges="keyboardHidden|orientation" android:configChanges="keyboardHidden|orientation"
android:label="@string/im_contact_selector" android:label="@string/im_contact_selector"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustPan" /> android:windowSoftInputMode="stateHidden|adjustPan" />
<!-- @ 选择器 --> <!-- @ 选择器 -->
<activity <activity
android:name="com.yidianling.uikit.business.ait.selector.AitContactSelectorActivity" android:name="com.yidianling.uikit.business.ait.selector.AitContactSelectorActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<!-- 视频 --> <!-- 视频 -->
<activity <activity
android:name="com.yidianling.uikit.business.session.activity.CaptureVideoActivity" android:name="com.yidianling.uikit.business.session.activity.CaptureVideoActivity"
android:configChanges="keyboardHidden|orientation" android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" /> android:windowSoftInputMode="stateHidden|adjustResize" />
<activity <activity
android:name="com.yidianling.uikit.business.session.activity.WatchVideoActivity" android:name="com.yidianling.uikit.business.session.activity.WatchVideoActivity"
android:configChanges="keyboardHidden|orientation|screenSize" android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/im_video_play" android:label="@string/im_video_play"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<!-- 查看大图 --> <!-- 查看大图 -->
<activity <activity
android:name="com.yidianling.uikit.business.session.activity.WatchMessagePictureActivity" android:name="com.yidianling.uikit.business.session.activity.WatchMessagePictureActivity"
android:configChanges="keyboardHidden" android:configChanges="keyboardHidden"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.uikit.business.session.activity.WatchPicAndVideoMenuActivity" android:name="com.yidianling.uikit.business.session.activity.WatchPicAndVideoMenuActivity"
android:configChanges="keyboardHidden" android:configChanges="keyboardHidden"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
</application> </application>
</manifest> </manifest>
...@@ -4,6 +4,7 @@ import android.annotation.SuppressLint ...@@ -4,6 +4,7 @@ import android.annotation.SuppressLint
import android.app.Application import android.app.Application
import android.os.Build import android.os.Build
import com.alibaba.android.arouter.launcher.ARouter import com.alibaba.android.arouter.launcher.ARouter
import com.bun.miitmdid.core.JLibrary
import com.ydl.devicesidlib.DeviceIDHelper import com.ydl.devicesidlib.DeviceIDHelper
import com.ydl.ydlcommon.base.BaseApp import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.data.http.UpLoadLogUtils import com.ydl.ydlcommon.data.http.UpLoadLogUtils
...@@ -28,7 +29,7 @@ object YdlRepository { ...@@ -28,7 +29,7 @@ object YdlRepository {
// 需要在主 module 的 application 的 onCreate 方法中调用此方法 // 需要在主 module 的 application 的 onCreate 方法中调用此方法
fun initApp(app: Application,isDebug:Boolean) { fun initApp(app: Application,isDebug:Boolean) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
// JLibrary.InitEntry(app) JLibrary.InitEntry(app)
} }
if (AppProgressUtils.isMainProcess(app)){ if (AppProgressUtils.isMainProcess(app)){
// DeviceIDHelper.getInstance().init(app.applicationContext) // DeviceIDHelper.getInstance().init(app.applicationContext)
......
...@@ -5,7 +5,7 @@ import android.util.Log; ...@@ -5,7 +5,7 @@ import android.util.Log;
import com.umeng.analytics.MobclickAgent; import com.umeng.analytics.MobclickAgent;
import com.ydl.burypointlib.BuryPointHelper; import com.ydl.burypointlib.BuryPointHelper;
import com.ydl.devicesidlib.DemoHelper; //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.YdlPushAgent;
import com.ydl.pushserver.pushagent.common.listener.IYDLPushListener; import com.ydl.pushserver.pushagent.common.listener.IYDLPushListener;
...@@ -18,7 +18,7 @@ import com.yidianling.common.tools.RxAppTool; ...@@ -18,7 +18,7 @@ import com.yidianling.common.tools.RxAppTool;
import com.yidianling.common.tools.RxDeviceTool; import com.yidianling.common.tools.RxDeviceTool;
import com.yidianling.common.tools.RxNetTool; import com.yidianling.common.tools.RxNetTool;
import static com.bun.miitmdid.content.ContextKeeper.getApplicationContext; //import static com.bun.miitmdid.content.ContextKeeper.getApplicationContext;
//import com.ydl.burypointlib.BuryPointHelper; //import com.ydl.burypointlib.BuryPointHelper;
//埋点工具类 //埋点工具类
...@@ -40,48 +40,43 @@ public class YdlBuryPointUtil { ...@@ -40,48 +40,43 @@ public class YdlBuryPointUtil {
if (isTest){ if (isTest){
YdlPushAgent.setDebugAdree("121.41.92.140",8091); YdlPushAgent.setDebugAdree("121.41.92.140",8091);
} }
DemoHelper helper=new DemoHelper(new DemoHelper.AppIdsUpdater() { RegisterEventBean registerEventBean = new RegisterEventBean();
@Override public void OnIdsAvalid(String ids) { registerEventBean.setAppId(context.getPackageName());
Log.e("AAAAA","getDeviceId:"+ids); registerEventBean.setAppVersion(RxAppTool.getAppVersionName(context));
RegisterEventBean registerEventBean = new RegisterEventBean(); String deviceId = DeviceIDHelper.getInstance().getDeviceId();
registerEventBean.setAppId(context.getPackageName()); registerEventBean.setDeviceId(deviceId);
registerEventBean.setAppVersion(RxAppTool.getAppVersionName(context)); registerEventBean.setManufacturer(RxDeviceTool.getBuildMANUFACTURER());
// String deviceId = DeviceIDHelper.getInstance().getDeviceId(); registerEventBean.setChannel(YdlCommonOut.Companion.getChannelName());
registerEventBean.setDeviceId(ids); registerEventBean.setOs("Android");
registerEventBean.setManufacturer(RxDeviceTool.getBuildMANUFACTURER()); registerEventBean.setModel(RxDeviceTool.getBuildBrandModel());
registerEventBean.setChannel(YdlCommonOut.Companion.getChannelName()); registerEventBean.setOsVersion(RxDeviceTool.getOsBuileVersion());
registerEventBean.setOs("Android"); registerEventBean.setUid(ModularServiceManager.INSTANCE.getPlatformUserService().getUser().getUserId()+"");
registerEventBean.setModel(RxDeviceTool.getBuildBrandModel()); registerEventBean.setScreenHeight(RxDeviceTool.getScreenHeight(context));
registerEventBean.setOsVersion(RxDeviceTool.getOsBuileVersion()); registerEventBean.setScreenWidth(RxDeviceTool.getScreenWidth(context));
registerEventBean.setUid(ModularServiceManager.INSTANCE.getPlatformUserService().getUser().getUserId()+""); registerEventBean.setWifi(RxNetTool.getNetWorkTypeName(context));
registerEventBean.setScreenHeight(RxDeviceTool.getScreenHeight(context)); LogUtil.d(registerEventBean.toString());
registerEventBean.setScreenWidth(RxDeviceTool.getScreenWidth(context)); YdlPushAgent.init(registerEventBean,appDebug, context1, new IYDLPushListener() {
registerEventBean.setWifi(RxNetTool.getNetWorkTypeName(context)); @Override
LogUtil.d(registerEventBean.toString()); public void onPushEvent() {
YdlPushAgent.init(registerEventBean,appDebug, context1, new IYDLPushListener() { MobclickAgent.onEvent(context1, "socket_push_event");
@Override }
public void onPushEvent() {
MobclickAgent.onEvent(context1, "socket_push_event"); @Override
} public void onPushRescueEvent() {
MobclickAgent.onEvent(context1, "socket_push_rescue_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");
}
});
} }
},getApplicationContext());
helper.getDeviceIds(getApplicationContext()); @Override
public void onSocketReconnect() {
MobclickAgent.onEvent(context1, "socket_reconnect");
}
@Override
public void onSocketDisconnect() {
MobclickAgent.onEvent(context1, "socket_disconnect");
}
});
BuryPointHelper.setDebug(isTest,isEditAlis,true,appDebug); BuryPointHelper.setDebug(isTest,isEditAlis,true,appDebug);
BuryPointHelper.init(); BuryPointHelper.init();
......
...@@ -6,25 +6,20 @@ import android.net.NetworkInfo ...@@ -6,25 +6,20 @@ 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.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.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.ydl.ydlcommon.utils.YdlBuryPointUtil import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.* import com.yidianling.common.tools.RxDeviceTool
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
...@@ -118,58 +113,55 @@ class ActionCountUtils { ...@@ -118,58 +113,55 @@ class ActionCountUtils {
try { try {
val helper = DemoHelper(DemoHelper.AppIdsUpdater { ids -> val actionDataParams = ActionDataBean.Builder()
val actionDataParams = ActionDataBean.Builder() actionDataParams.partId(partId)
actionDataParams.partId(partId) actionDataParams.position(position)
actionDataParams.position(position) actionDataParams.url(url)
actionDataParams.url(url)
uid?.let { uid?.let {
actionDataParams.uid(uid) actionDataParams.uid(uid)
} }
actionDataParams.time(System.currentTimeMillis()) actionDataParams.time(System.currentTimeMillis())
actionDataParams.appVersion(RxDeviceTool.getAppVersionName(BaseApp.getApp())) actionDataParams.appVersion(RxDeviceTool.getAppVersionName(BaseApp.getApp()))
actionDataParams.appId(appId) actionDataParams.appId(appId)
actionDataParams.api(api) actionDataParams.api(api)
actionDataParams.manufacturer(android.os.Build.BRAND.trim().toUpperCase()) actionDataParams.manufacturer(android.os.Build.BRAND.trim().toUpperCase())
actionDataParams.model(android.os.Build.MODEL) actionDataParams.model(android.os.Build.MODEL)
actionDataParams.os(BIConstants.OS) actionDataParams.os(BIConstants.OS)
actionDataParams.osVersion(android.os.Build.VERSION.RELEASE) actionDataParams.osVersion(android.os.Build.VERSION.RELEASE)
actionDataParams.wifi(if (isWifi()) 0 else 1) actionDataParams.wifi(if (isWifi()) 0 else 1)
val deviceId =
actionDataParams.deviceId(ids) DeviceIDHelper.getInstance().deviceId
signs == null ?: signs.forEachIndexed { index, s -> actionDataParams.deviceId(deviceId)
//拓展参数个数确定,暂不使用反射调用 signs == null ?: signs.forEachIndexed { index, s ->
//actionDataParams.javaClass.getMethod("sign$index").invoke(s) //拓展参数个数确定,暂不使用反射调用
when (index) { //actionDataParams.javaClass.getMethod("sign$index").invoke(s)
0 -> { when (index) {
actionDataParams.sign1(s) 0 -> {
} actionDataParams.sign1(s)
1 -> { }
actionDataParams.sign2(s) 1 -> {
} actionDataParams.sign2(s)
2 -> { }
actionDataParams.sign3(s) 2 -> {
} actionDataParams.sign3(s)
3 -> { }
actionDataParams.sign4(s) 3 -> {
} actionDataParams.sign4(s)
4 -> { }
actionDataParams.sign5(s) 4 -> {
} actionDataParams.sign5(s)
} }
} }
actionDataParams.screenWidth(RxDeviceTool.getScreenWidth(RxTool.getContext()!!))
actionDataParams.screenHeight(RxDeviceTool.getScreenHeight(RxTool.getContext()!!))
//剩余额外参数根据需求定义 }
actionDataParams.screenWidth(RxDeviceTool.getScreenWidth(RxTool.getContext()!!))
actionDataParams.screenHeight(RxDeviceTool.getScreenHeight(RxTool.getContext()!!))
//请求 //剩余额外参数根据需求定义
request(actionDataParams.build())
}, ContextKeeper.getApplicationContext()) //请求
helper.getDeviceIds(ContextKeeper.getApplicationContext()) request(actionDataParams.build())
} catch (e: Exception) { } catch (e: Exception) {
...@@ -210,46 +202,44 @@ class ActionCountUtils { ...@@ -210,46 +202,44 @@ 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 val deviceId =
baiduActionDataParams.deviceId(ids) DeviceIDHelper.getInstance().deviceId
baiduActionDataParams.convertType(convertType) baiduActionDataParams.deviceId(deviceId)
baiduActionDataParams.convertTime(System.currentTimeMillis() / 1000) baiduActionDataParams.convertType(convertType)
baiduActionDataParams.appid(0.toLong()) baiduActionDataParams.convertTime(System.currentTimeMillis() / 1000)
baiduActionDataParams.appName(appName) baiduActionDataParams.appid(0.toLong())
baiduActionDataParams.androidId(DeviceTool.getAndroidID()) baiduActionDataParams.appName(appName)
baiduActionDataParams.ip("") baiduActionDataParams.androidId(DeviceTool.getAndroidID())
baiduActionDataParams.ipv6("") baiduActionDataParams.ip("")
baiduActionDataParams.tp(android.os.Build.MODEL) baiduActionDataParams.ipv6("")
baiduActionDataParams.network(DeviceTool.getNetworkState(RxTool.getContext())) baiduActionDataParams.tp(android.os.Build.MODEL)
baiduActionDataParams.convertParam("") baiduActionDataParams.network(DeviceTool.getNetworkState(RxTool.getContext()))
baiduActionDataParams.uid(uid) baiduActionDataParams.convertParam("")
Log.e("baiduActionDataParams", "---------${baiduActionDataParams}") baiduActionDataParams.uid(uid)
try { Log.e("baiduActionDataParams", "---------${baiduActionDataParams}")
var mac = DeviceTool.getMac(BaseApp.getApp()) try {
if (!TextUtils.isEmpty(mac)) { var mac = DeviceTool.getMac(BaseApp.getApp())
mac = mac.replace(":", "") 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()) com.ydl.ydlcommon.utils.LogUtil.d("MAC=${mac}")
val gson = Gson().toJson(baiduActionDataParams) baiduActionDataParams.mac(mac)
Log.e("Action", "---------$gson") } catch (e: Exception) {
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) { } 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