Commit 8c78f6d9 by 霍志良

feat:

parent f06b463f
......@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.30.00",
"m-user" : "0.0.60.25",
"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-article" : "0.0.0.6",
......@@ -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-media" : "0.0.21.6",
"ydl-pay" : "0.0.18.9",
"m-audioim" : "0.0.49.29.7",
......@@ -93,7 +94,7 @@ ext {
"m-fm" : "0.0.23.5",
"m-user" : "0.0.41.4",
"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-muse" : "0.0.20.7",
......@@ -114,7 +115,7 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.39.49",
"ydl-platform" : "0.0.39.52",
//第二步 若干
"ydl-webview" : "0.0.38.31",
......@@ -263,7 +264,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.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-utils" : "com.ydl:ydl-utils:${ydlCompileVersion["ydl-utils"]}",
......
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yidianling.im"
android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.BROADCAST_STICKY"/>
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<permission
android:name="${APPLICATIONID}.permission.RECEIVE_MSG"
android:protectionLevel="signature" />
<uses-permission android:name="${APPLICATIONID}.permission.RECEIVE_MSG" />
<application>
<receiver android:name="com.netease.nimlib.mixpush.hw.HWPushReceiver">
<intent-filter>
<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.CLICK" />
<action android:name="com.huawei.intent.action.PUSH_STATE" />
</intent-filter>
<meta-data
android:name="CS_cloud_ablitity"
android:value="successRateAnalytics" />
</receiver>
<!-- ==================== IM ==================== -->
<!-- ==================== IM ==================== -->
<!-- ==================== IM ==================== -->
<meta-data
android:name="com.netease.nim.appKey"
android:value="4e258ba5cdf489fa188274ebf0fb5669" />
<!-- 全面屏配置 -->
<meta-data
android:name="android.max_aspect"
android:value="2.1" />
<activity
android:name=".ui.activity.SystemMsgDetailActivity"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
/>
<activity
android:name=".ui.activity.OtherMsgDetailActivity"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
/>
<!-- 云信 集成配置 -->
<!-- 声明云信后台服务 -->
<service
android:name="com.netease.nimlib.service.NimService"
android:process=":core" />
<!-- 运行后台辅助服务 -->
<service
android:name="com.netease.nimlib.service.NimService$Aux"
android:process=":core" />
<!-- 声明云信后台辅助服务 -->
<service
android:name="com.netease.nimlib.job.NIMJobService"
android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE"
android:process=":core" />
<!-- 云信SDK的监视系统启动和网络变化的广播接收器,用户开机自启动以及网络变化时候重新登录 -->
<receiver
android:name="com.netease.nimlib.service.NimReceiver"
android:exported="false"
android:process=":core">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
<!-- 云信进程间通信receiver -->
<receiver android:name="com.netease.nimlib.service.ResponseReceiver" />
<!-- 云信进程间通信service -->
<service android:name="com.netease.nimlib.service.ResponseService" />
<!-- 云信进程间通信provider -->
<!-- android:authorities="{包名}.ipc.provider", 请将com.yidianling.im替换为自己的包名 -->
<provider
android:name="com.netease.nimlib.ipc.NIMContentProvider"
android:authorities="${APPLICATIONID}.ipc.provider"
android:exported="false"
android:process=":core" />
<!-- ====================IM - AvChat==================== -->
<!-- ====================IM - AvChat==================== -->
<!-- ====================IM - AvChat==================== -->
<activity
android:name="com.yidianling.avchatkit.activity.AVChatActivity"
android:launchMode="singleInstance"
android:screenOrientation="portrait"
android:theme="@style/FullScreenTheme"
android:windowSoftInputMode="stateAlwaysHidden" />
<!-- 音视频 -->
<activity
android:name="com.yidianling.avchatkit.teamavchat.activity.TeamAVChatActivity"
android:launchMode="singleInstance"
android:screenOrientation="portrait"
android:theme="@style/FullScreenTheme"
android:windowSoftInputMode="stateAlwaysHidden" />
<!-- 申明本地电话状态(通话状态)的广播接收器,第三方APP集成时音视频模块时,如果需要在App中处理网络通话与本地电话的交互请加上此接收器 -->
<receiver android:name="com.yidianling.avchatkit.receiver.IncomingCallReceiver">
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
</intent-filter>
</receiver>
<!-- ====================IM - UIKit==================== -->
<!-- ====================IM - UIKit==================== -->
<!-- ====================IM - UIKit==================== -->
<activity
android:name="com.yidianling.uikit.business.session.activity.YDLP2PMessageActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="com.yidianling.uikit.business.session.activity.YDLTeamMessageActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<!-- 群聊 -->
<activity
android:name="com.yidianling.uikit.business.team.activity.NormalTeamInfoActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamInfoActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamMemberActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamAnnounceActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamMemberInfoActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamNicknameActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamCreateAnnounceActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="com.yidianling.uikit.business.team.activity.TeamPropertySettingActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<!-- 联系人选择器 -->
<activity
android:name="com.yidianling.uikit.business.contact.selector.activity.ContactSelectActivity"
android:configChanges="keyboardHidden|orientation"
android:label="@string/im_contact_selector"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustPan" />
<!-- @ 选择器 -->
<activity
android:name="com.yidianling.uikit.business.ait.selector.AitContactSelectorActivity"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" />
<!-- 视频 -->
<activity
android:name="com.yidianling.uikit.business.session.activity.CaptureVideoActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="com.yidianling.uikit.business.session.activity.WatchVideoActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/im_video_play"
android:theme="@style/platform_NoTitleTheme" />
<!-- 查看大图 -->
<activity
android:name="com.yidianling.uikit.business.session.activity.WatchMessagePictureActivity"
android:configChanges="keyboardHidden"
android:theme="@style/platform_NoTitleTheme" />
<activity
android:name="com.yidianling.uikit.business.session.activity.WatchPicAndVideoMenuActivity"
android:configChanges="keyboardHidden"
android:theme="@style/platform_NoTitleTheme" />
</application>
</manifest>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yidianling.im"
android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.BROADCAST_STICKY"/>
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<permission
android:name="${APPLICATIONID}.permission.RECEIVE_MSG"
android:protectionLevel="signature" />
<uses-permission android:name="${APPLICATIONID}.permission.RECEIVE_MSG" />
<application>
<!--<receiver android:name="com.netease.nimlib.mixpush.hw.HWPushReceiver">
<intent-filter>
<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.CLICK" />
<action android:name="com.huawei.intent.action.PUSH_STATE" />
</intent-filter>
<meta-data
android:name="CS_cloud_ablitity"
android:value="successRateAnalytics" />
</receiver>-->
<!-- ==================== IM ==================== -->
<!-- ==================== IM ==================== -->
<!-- ==================== IM ==================== -->
<meta-data
android:name="com.netease.nim.appKey"
android:value="4e258ba5cdf489fa188274ebf0fb5669" />
<!-- 全面屏配置 -->
<meta-data
android:name="android.max_aspect"
android:value="2.1" />
<activity
android:name=".ui.activity.SystemMsgDetailActivity"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
/>
<activity
android:name=".ui.activity.OtherMsgDetailActivity"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
/>
<!-- 云信 集成配置 -->
<!-- 声明云信后台服务 -->
<service
android:name="com.netease.nimlib.service.NimService"
android:process=":core" />
<!-- 运行后台辅助服务 -->
<service
android:name="com.netease.nimlib.service.NimService$Aux"
android:process=":core" />
<!-- 声明云信后台辅助服务 -->
<service
android:name="com.netease.nimlib.job.NIMJobService"
android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE"
android:process=":core" />
<!-- 云信SDK的监视系统启动和网络变化的广播接收器,用户开机自启动以及网络变化时候重新登录 -->
<receiver
android:name="com.netease.nimlib.service.NimReceiver"
android:exported="false"
android:process=":core">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
<!-- 云信进程间通信receiver -->
<receiver android:name="com.netease.nimlib.service.ResponseReceiver" />
<!-- 云信进程间通信service -->
<service android:name="com.netease.nimlib.service.ResponseService" />
<!-- 云信进程间通信provider -->
<!-- android:authorities="{包名}.ipc.provider", 请将com.yidianling.im替换为自己的包名 -->
<provider
android:name="com.netease.nimlib.ipc.NIMContentProvider"
android:authorities="${APPLICATIONID}.ipc.provider"
android:exported="false"
android:process=":core" />
<!-- ====================IM - AvChat==================== -->
<!-- ====================IM - AvChat==================== -->
<!-- ====================IM - AvChat==================== -->
<activity
android:name="com.yidianling.avchatkit.activity.AVChatActivity"
android:launchMode="singleInstance"
android:screenOrientation="portrait"
android:theme="@style/FullScreenTheme"
android:windowSoftInputMode="stateAlwaysHidden" />
<!-- 音视频 -->
<activity
android:name="com.yidianling.avchatkit.teamavchat.activity.TeamAVChatActivity"
android:launchMode="singleInstance"
android:screenOrientation="portrait"
android:theme="@style/FullScreenTheme"
android:windowSoftInputMode="stateAlwaysHidden" />
<!-- 申明本地电话状态(通话状态)的广播接收器,第三方APP集成时音视频模块时,如果需要在App中处理网络通话与本地电话的交互请加上此接收器 -->
<receiver android:name="com.yidianling.avchatkit.receiver.IncomingCallReceiver">
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
</intent-filter>
</receiver>
<!-- ====================IM - UIKit==================== -->
<!-- ====================IM - UIKit==================== -->
<!-- ====================IM - UIKit==================== -->
<activity
android:name="com.yidianling.uikit.business.session.activity.YDLP2PMessageActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="com.yidianling.uikit.business.session.activity.YDLTeamMessageActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<!-- 群聊 -->
<activity
android:name="com.yidianling.uikit.business.team.activity.NormalTeamInfoActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamInfoActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamMemberActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamAnnounceActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamMemberInfoActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamNicknameActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="com.yidianling.uikit.business.team.activity.AdvancedTeamCreateAnnounceActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="com.yidianling.uikit.business.team.activity.TeamPropertySettingActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<!-- 联系人选择器 -->
<activity
android:name="com.yidianling.uikit.business.contact.selector.activity.ContactSelectActivity"
android:configChanges="keyboardHidden|orientation"
android:label="@string/im_contact_selector"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustPan" />
<!-- @ 选择器 -->
<activity
android:name="com.yidianling.uikit.business.ait.selector.AitContactSelectorActivity"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" />
<!-- 视频 -->
<activity
android:name="com.yidianling.uikit.business.session.activity.CaptureVideoActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="com.yidianling.uikit.business.session.activity.WatchVideoActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/im_video_play"
android:theme="@style/platform_NoTitleTheme" />
<!-- 查看大图 -->
<activity
android:name="com.yidianling.uikit.business.session.activity.WatchMessagePictureActivity"
android:configChanges="keyboardHidden"
android:theme="@style/platform_NoTitleTheme" />
<activity
android:name="com.yidianling.uikit.business.session.activity.WatchPicAndVideoMenuActivity"
android:configChanges="keyboardHidden"
android:theme="@style/platform_NoTitleTheme" />
</application>
</manifest>
......@@ -4,6 +4,7 @@ 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
......@@ -28,7 +29,7 @@ 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)
......
......@@ -5,7 +5,7 @@ import android.util.Log;
import com.umeng.analytics.MobclickAgent;
import com.ydl.burypointlib.BuryPointHelper;
import com.ydl.devicesidlib.DemoHelper;
//import com.ydl.devicesidlib.DemoHelper;
import com.ydl.devicesidlib.DeviceIDHelper;
import com.ydl.pushserver.pushagent.YdlPushAgent;
import com.ydl.pushserver.pushagent.common.listener.IYDLPushListener;
......@@ -18,7 +18,7 @@ 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 static com.bun.miitmdid.content.ContextKeeper.getApplicationContext;
//import com.ydl.burypointlib.BuryPointHelper;
//埋点工具类
......@@ -40,48 +40,43 @@ public class YdlBuryPointUtil {
if (isTest){
YdlPushAgent.setDebugAdree("121.41.92.140",8091);
}
DemoHelper helper=new DemoHelper(new DemoHelper.AppIdsUpdater() {
@Override public void OnIdsAvalid(String ids) {
Log.e("AAAAA","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");
}
});
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");
}
},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.init();
......
......@@ -6,25 +6,20 @@ 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.bun.miitmdid.content.ContextKeeper
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.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.ydl.ydlcommon.utils.YdlBuryPointUtil
import com.yidianling.common.tools.*
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxTool
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import java.net.Inet4Address
......@@ -118,58 +113,55 @@ class ActionCountUtils {
try {
val helper = DemoHelper(DemoHelper.AppIdsUpdater { ids ->
val actionDataParams = ActionDataBean.Builder()
actionDataParams.partId(partId)
actionDataParams.position(position)
actionDataParams.url(url)
val actionDataParams = ActionDataBean.Builder()
actionDataParams.partId(partId)
actionDataParams.position(position)
actionDataParams.url(url)
uid?.let {
actionDataParams.uid(uid)
}
actionDataParams.time(System.currentTimeMillis())
actionDataParams.appVersion(RxDeviceTool.getAppVersionName(BaseApp.getApp()))
actionDataParams.appId(appId)
actionDataParams.api(api)
actionDataParams.manufacturer(android.os.Build.BRAND.trim().toUpperCase())
actionDataParams.model(android.os.Build.MODEL)
actionDataParams.os(BIConstants.OS)
actionDataParams.osVersion(android.os.Build.VERSION.RELEASE)
actionDataParams.wifi(if (isWifi()) 0 else 1)
actionDataParams.deviceId(ids)
signs == null ?: signs.forEachIndexed { index, s ->
//拓展参数个数确定,暂不使用反射调用
//actionDataParams.javaClass.getMethod("sign$index").invoke(s)
when (index) {
0 -> {
actionDataParams.sign1(s)
}
1 -> {
actionDataParams.sign2(s)
}
2 -> {
actionDataParams.sign3(s)
}
3 -> {
actionDataParams.sign4(s)
}
4 -> {
actionDataParams.sign5(s)
}
uid?.let {
actionDataParams.uid(uid)
}
actionDataParams.time(System.currentTimeMillis())
actionDataParams.appVersion(RxDeviceTool.getAppVersionName(BaseApp.getApp()))
actionDataParams.appId(appId)
actionDataParams.api(api)
actionDataParams.manufacturer(android.os.Build.BRAND.trim().toUpperCase())
actionDataParams.model(android.os.Build.MODEL)
actionDataParams.os(BIConstants.OS)
actionDataParams.osVersion(android.os.Build.VERSION.RELEASE)
actionDataParams.wifi(if (isWifi()) 0 else 1)
val deviceId =
DeviceIDHelper.getInstance().deviceId
actionDataParams.deviceId(deviceId)
signs == null ?: signs.forEachIndexed { index, s ->
//拓展参数个数确定,暂不使用反射调用
//actionDataParams.javaClass.getMethod("sign$index").invoke(s)
when (index) {
0 -> {
actionDataParams.sign1(s)
}
1 -> {
actionDataParams.sign2(s)
}
2 -> {
actionDataParams.sign3(s)
}
3 -> {
actionDataParams.sign4(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) {
......@@ -210,46 +202,44 @@ 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
val deviceId =
DeviceIDHelper.getInstance().deviceId
baiduActionDataParams.deviceId(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)
Log.e("baiduActionDataParams", "---------${baiduActionDataParams}")
try {
var mac = DeviceTool.getMac(BaseApp.getApp())
if (!TextUtils.isEmpty(mac)) {
mac = mac.replace(":", "")
}
baiduActionDataParams.channel(YdlCommonOut.getChannelName())
val gson = Gson().toJson(baiduActionDataParams)
Log.e("Action", "---------$gson")
actionDataParams.sign2(gson)
actionDataParams.sign3(YdlCommonOut.getChannelName())
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())
//请求
ActionCountUtils.request(actionDataParams.build())
//剩余额外参数根据需求定义
}, ContextKeeper.getApplicationContext())
helper.getDeviceIds(ContextKeeper.getApplicationContext())
//请求
ActionCountUtils.request(actionDataParams.build())
} 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