Commit 4f8ada71 by 刘鹏

Merge branch 'fix/lp/lp_remoce_trace_point_code' into 'd/v4.4.08'

feat: 删除无痕埋点残余代码

See merge request app_android_lib/YDL-Component!325
parents 62026965 1ded5806
...@@ -3,7 +3,6 @@ package com.ydl.component.base ...@@ -3,7 +3,6 @@ package com.ydl.component.base
import android.app.Application import android.app.Application
import android.content.Context import android.content.Context
import android.content.Intent
import android.os.Build import android.os.Build
import android.os.Looper import android.os.Looper
import android.os.Process import android.os.Process
...@@ -22,18 +21,15 @@ import com.ydl.component.MainActivity ...@@ -22,18 +21,15 @@ import com.ydl.component.MainActivity
import com.ydl.component.R import com.ydl.component.R
import com.ydl.ydlcommon.actions.crash.Cockroach import com.ydl.ydlcommon.actions.crash.Cockroach
import com.ydl.ydlcommon.actions.crash.ExceptionHandler import com.ydl.ydlcommon.actions.crash.ExceptionHandler
import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.base.config.YDLConstants import com.ydl.ydlcommon.base.config.YDLConstants
import com.ydl.ydlcommon.base.delegate.IAppLifecycles import com.ydl.ydlcommon.base.delegate.IAppLifecycles
import com.ydl.ydlcommon.utils.AppProgressUtils import com.ydl.ydlcommon.utils.AppProgressUtils
import com.ydl.ydlcommon.utils.LogUtil import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.YdlBuryPointUtil
import com.ydl.ydlcommon.utils.log.LogHelper import com.ydl.ydlcommon.utils.log.LogHelper
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.api.bean.IMInitConfigBean import com.yidianling.im.api.bean.IMInitConfigBean
import com.yidianling.im.config.NimApplication import com.yidianling.im.config.NimApplication
import io.flutter.view.FlutterMain import io.flutter.view.FlutterMain
import io.reactivex.functions.Action
/** /**
* Created by haorui on 2019-09-02. * Created by haorui on 2019-09-02.
...@@ -146,10 +142,7 @@ class DemoAppLifecycles : IAppLifecycles { ...@@ -146,10 +142,7 @@ class DemoAppLifecycles : IAppLifecycles {
//开启友盟集成测试 //开启友盟集成测试
UMConfigure.setLogEnabled(BuildConfig.DEBUG) UMConfigure.setLogEnabled(BuildConfig.DEBUG)
HttpConfig.getInstance().initSocketConfig(Action {
//数据埋点初始化 (一定要放在主进程中/因为用到了umeng统计,需要放在umeng初始化后)
YdlBuryPointUtil.init(application, true)
})
//安全检测 //安全检测
//YDLAppProtector.init(); //YDLAppProtector.init();
......
...@@ -8,9 +8,7 @@ import com.ydl.webview.NewH5Activity ...@@ -8,9 +8,7 @@ import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.data.PlatformDataManager import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.data.http.ThrowableConsumer import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.utils.ActivityManager import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.Utils import com.ydl.ydlcommon.utils.Utils
import com.ydl.ydlcommon.utils.YdlBuryPointUtil
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlnet.YDLHttpUtils.Companion.obtainApi import com.ydl.ydlnet.YDLHttpUtils.Companion.obtainApi
import com.yidianling.consultant.ConsultAssistantCenterActivity import com.yidianling.consultant.ConsultAssistantCenterActivity
...@@ -126,14 +124,12 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -126,14 +124,12 @@ class ConsultAssistantDialogUtils private constructor() {
if (ConsultantIn.getUserImpl().isLogin()){ if (ConsultantIn.getUserImpl().isLogin()){
//获取用户uid //获取用户uid
ActionCountUtils.count("main_page|main_daoyi_entry_click") ActionCountUtils.count("main_page|main_daoyi_entry_click")
YdlBuryPointUtil.sendClick("home_page_assistant_click")
getConsultAssistantUid("", activity, 1) getConsultAssistantUid("", activity, 1)
}else{ }else{
ConsultantIn.getUserImpl().loginByOneKeyLoginCallBack(activity,true,object :LoginCallBackListener{ ConsultantIn.getUserImpl().loginByOneKeyLoginCallBack(activity,true,object :LoginCallBackListener{
override fun loginSuccess() { override fun loginSuccess() {
//获取用户uid //获取用户uid
ActionCountUtils.count("main_page|main_daoyi_entry_click") ActionCountUtils.count("main_page|main_daoyi_entry_click")
YdlBuryPointUtil.sendClick("home_page_assistant_click")
getConsultAssistantUid("", activity, 1) getConsultAssistantUid("", activity, 1)
} }
override fun notLogin() { override fun notLogin() {
...@@ -284,7 +280,6 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -284,7 +280,6 @@ class ConsultAssistantDialogUtils private constructor() {
return@onClickAction return@onClickAction
} }
ActionCountUtils.count("app_consult_list_page|app_consult_list_daoyi_entry_click") ActionCountUtils.count("app_consult_list_page|app_consult_list_daoyi_entry_click")
YdlBuryPointUtil.sendClick("assistant_list_click")
if (ConsultantIn.getUserImpl().isLogin()){ if (ConsultantIn.getUserImpl().isLogin()){
//获取用户uid //获取用户uid
...@@ -316,7 +311,6 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -316,7 +311,6 @@ class ConsultAssistantDialogUtils private constructor() {
return@onClickAction return@onClickAction
} }
ActionCountUtils.count("app_consult_list_page|app_consult_list_daoyi_entry_click") ActionCountUtils.count("app_consult_list_page|app_consult_list_daoyi_entry_click")
YdlBuryPointUtil.sendClick("assistant_list_click")
// 咨询师列表页面且未登录情况下,跳转登录页面 // 咨询师列表页面且未登录情况下,跳转登录页面
if (ConsultantIn.loginByOneKeyLogin(activity, true)) { if (ConsultantIn.loginByOneKeyLogin(activity, true)) {
//获取用户uid //获取用户uid
......
...@@ -6,7 +6,6 @@ import android.view.View ...@@ -6,7 +6,6 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.FrameLayout import android.widget.FrameLayout
import android.widget.LinearLayout import android.widget.LinearLayout
import com.ydl.ydlcommon.utils.YdlBuryPointUtil
import com.ydl.ydlcommon.view.banner.GlideImageLoader import com.ydl.ydlcommon.view.banner.GlideImageLoader
import com.yidianling.common.tools.RxDeviceTool import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool import com.yidianling.common.tools.RxImageTool
...@@ -68,10 +67,6 @@ class HomeImageBannerView(val mContext: Context, val homeEvent: IHomeBaseEvent) ...@@ -68,10 +67,6 @@ class HomeImageBannerView(val mContext: Context, val homeEvent: IHomeBaseEvent)
.setImages(imageViews).start() .setImages(imageViews).start()
banner_search.setOnBannerListener { banner_search.setOnBannerListener {
homeEvent?.bannerClick(cacheList!![it]) homeEvent?.bannerClick(cacheList!![it])
YdlBuryPointUtil.sendClick(
"ydl-xinlizixun-home-banner$it",
"${cacheList[it].imageUrl}"
)
} }
} }
} }
......
...@@ -5,13 +5,12 @@ import android.view.View ...@@ -5,13 +5,12 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.FrameLayout import android.widget.FrameLayout
import android.widget.RelativeLayout import android.widget.RelativeLayout
import com.ydl.ydlcommon.utils.YdlBuryPointUtil
import com.ydl.ydlcommon.view.banner.GlideImageLoader import com.ydl.ydlcommon.view.banner.GlideImageLoader
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeHeaderBean import com.yidianling.home.model.bean.HomeHeaderBean
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool
import kotlinx.android.synthetic.ydl.home_pager_banner_view.view.* import kotlinx.android.synthetic.ydl.home_pager_banner_view.view.*
...@@ -115,7 +114,6 @@ class HomePagerBannerView(private val mContext: Context, private var homeEvent: ...@@ -115,7 +114,6 @@ class HomePagerBannerView(private val mContext: Context, private var homeEvent:
homeModulePagerBannerViewBanner.setOnBannerListener { homeModulePagerBannerViewBanner.setOnBannerListener {
if (it < cacheList?.size) { if (it < cacheList?.size) {
homeEvent?.bannerClick(cacheList[it]) homeEvent?.bannerClick(cacheList[it])
YdlBuryPointUtil.sendClick("ydl-user-home-banner$it","${cacheList[it].imageUrl}")
} }
} }
} }
......
...@@ -4,7 +4,6 @@ import android.text.TextUtils ...@@ -4,7 +4,6 @@ import android.text.TextUtils
import com.google.gson.Gson import com.google.gson.Gson
import com.ydl.ydlcommon.utils.SharedPreferencesEditor import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.utils.UserInfoCache import com.ydl.ydlcommon.utils.UserInfoCache
import com.ydl.ydlcommon.utils.YdlBuryPointUtil
import com.yidianling.user.api.bean.UserResponseBean import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.api.bean.UserSettingBean import com.yidianling.user.api.bean.UserSettingBean
...@@ -39,7 +38,6 @@ object UserHelper { ...@@ -39,7 +38,6 @@ object UserHelper {
UserInfoCache.getInstance().saveYDLUser("\"" + userInfo?.uid + "\"", UserInfoCache.getInstance().saveYDLUser("\"" + userInfo?.uid + "\"",
userInfo?.userInfo?.nick_name, userInfo?.userInfo?.head) userInfo?.userInfo?.nick_name, userInfo?.userInfo?.head)
YdlBuryPointUtil.reLogin()
} catch (e: Exception) { } catch (e: Exception) {
e.printStackTrace() e.printStackTrace()
} }
......
...@@ -25,7 +25,6 @@ import com.ydl.ydlcommon.data.http.ThrowableConsumer ...@@ -25,7 +25,6 @@ import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.modular.ModularServiceManager.provide import com.ydl.ydlcommon.modular.ModularServiceManager.provide
import com.ydl.ydlcommon.utils.BuryPointUtils import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.Utils import com.ydl.ydlcommon.utils.Utils
import com.ydl.ydlcommon.utils.YdlBuryPointUtil
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils.Companion.count import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils.Companion.count
import com.ydl.ydlcommon.view.dialog.YDLShareDialog import com.ydl.ydlcommon.view.dialog.YDLShareDialog
import com.ydl.ydlcommon.view.dialog.YDLShareDialog.Companion.style4 import com.ydl.ydlcommon.view.dialog.YDLShareDialog.Companion.style4
...@@ -99,7 +98,6 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View. ...@@ -99,7 +98,6 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
jtv_account_enter.setOnClickListener(this) jtv_account_enter.setOnClickListener(this)
cv_duration.setOnClickListener(this) cv_duration.setOnClickListener(this)
text_userName.setOnClickListener(this) text_userName.setOnClickListener(this)
jtv_test.setOnClickListener(this)
swipe_refresh_layout.setOnRefreshListener(this) swipe_refresh_layout.setOnRefreshListener(this)
rootView.findViewById<View>(R.id.csl_trade_order).setOnClickListener(this) rootView.findViewById<View>(R.id.csl_trade_order).setOnClickListener(this)
rootView.findViewById<View>(R.id.jtv_introduce).setOnClickListener(this) rootView.findViewById<View>(R.id.jtv_introduce).setOnClickListener(this)
...@@ -572,10 +570,6 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View. ...@@ -572,10 +570,6 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
count(UserMyPageEvent.YDL_USER_MY_BOTTOM_TYPE_CLICK, "壹点灵介绍") count(UserMyPageEvent.YDL_USER_MY_BOTTOM_TYPE_CLICK, "壹点灵介绍")
val params1 = H5Params("https://m.yidianling.com/about", "网站介绍") val params1 = H5Params("https://m.yidianling.com/about", "网站介绍")
NewH5Activity.start(activity, params1) NewH5Activity.start(activity, params1)
} else if (id == R.id.btn_change) {
} else if (id == R.id.jtv_test) { //debug下任意门入口
jtv_test?.postDelayed({ YdlBuryPointUtil.sendPv("PvEvent") }, 300)
jtv_test?.postDelayed({ YdlBuryPointUtil.sendClick("ClickEvent") }, 500)
} else if (id == R.id.ll_meditation) { //冥想 } else if (id == R.id.ll_meditation) { //冥想
count(UserMyPageEvent.YDL_USER_MY_MIDDLE_TYPE_CLICK, "冥想") count(UserMyPageEvent.YDL_USER_MY_MIDDLE_TYPE_CLICK, "冥想")
mActivity?.let { mActivity?.let {
......
...@@ -744,19 +744,6 @@ ...@@ -744,19 +744,6 @@
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
<com.ydl.ydlcommon.view.JumpTextView
android:id="@+id/jtv_test"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginBottom="20dp"
android:background="@color/white"
android:visibility="gone"
app:pa_jump_tv_icon="@drawable/user_mine_ic_mine_share"
app:pa_jump_tv_left_color="@color/platform_color_999999"
app:pa_jump_tv_left_size="12sp"
app:pa_jump_tv_left_text="debug环境任意门" />
<ImageView <ImageView
android:id="@+id/iv_mine_logo" android:id="@+id/iv_mine_logo"
android:layout_width="match_parent" android:layout_width="match_parent"
......
package com.channel.ydl_flutter_base.plugin package com.channel.ydl_flutter_base.plugin
import android.app.Activity
import android.text.TextUtils import android.text.TextUtils
import com.channel.ydl_flutter_base.base.BaseFlutterFragment import com.channel.ydl_flutter_base.base.BaseFlutterFragment
import com.channel.ydl_flutter_base.event.MainScrollEnableEvent import com.channel.ydl_flutter_base.event.MainScrollEnableEvent
import com.ydl.burypointlib.BuryPointHelper
import com.ydl.burypointlib.MD5Util
import com.ydl.ydlcommon.base.BaseApp import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.base.config.YDLConstants import com.ydl.ydlcommon.base.config.YDLConstants
import com.ydl.ydlcommon.data.PlatformDataManager import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.data.http.GsonProvider import com.ydl.ydlcommon.data.http.GsonProvider
import com.ydl.ydlcommon.modular.ModularServiceManager import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.router.YdlCommonOut import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.utils.* import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.common.tools.RxDeviceTool import com.yidianling.common.tools.RxDeviceTool
import de.greenrobot.event.EventBus import de.greenrobot.event.EventBus
...@@ -121,34 +120,15 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler { ...@@ -121,34 +120,15 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler {
val ownerClass = Class.forName("com.ydl.burypointlib.BuryPointHelper") val ownerClass = Class.forName("com.ydl.burypointlib.BuryPointHelper")
val field = ownerClass.getDeclaredField("openEdit") val field = ownerClass.getDeclaredField("openEdit")
field.isAccessible = true field.isAccessible = true
val property = field.get(ownerClass)
if (property is Boolean && property) {
var activity: Activity? = mActivity
if (mActivity == null && mFragment != null) {
activity = mFragment?.activity!!
}
activity?.let {
BuryPointHelper.showEditDialog(
activity,
MD5Util.md5(clickPath),
null
)
}
}
} catch (e: Exception) { } catch (e: Exception) {
LogUtil.e("flutter click exception:$e") LogUtil.e("flutter click exception:$e")
} }
YdlBuryPointUtil.sendClick(MD5Util.md5(clickPath))
} }
} }
ACTION_PUSH_EVENT_TRACKING_PV -> { ACTION_PUSH_EVENT_TRACKING_PV -> {
val map = methodCall.arguments as HashMap<*, *>
val pvPath = map["path"] as String
if (!TextUtils.isEmpty(pvPath)) {
YdlBuryPointUtil.sendPv(pvPath)
}
} }
ACTION_ORIGIN_THEME -> { ACTION_ORIGIN_THEME -> {
val mMap = mutableMapOf<String, String>() val mMap = mutableMapOf<String, String>()
......
package com.ydl.ydlcommon.base.config; package com.ydl.ydlcommon.base.config;
import com.ydl.burypointlib.MD5Util;
import com.ydl.ydlcommon.utils.LogUtil; import com.ydl.ydlcommon.utils.MD5Util;
/** /**
* Created by Ykai on 2021/1/11. * Created by Ykai on 2021/1/11.
* * <p>
* 获取加密参数类 * 获取加密参数类
*/ */
public class EncryptionParams { public class EncryptionParams {
public static String getSign(String path,String timestamp){ public static String getSign(String path, String timestamp) {
// Map<String,String> map = new HashMap<>(); // Map<String,String> map = new HashMap<>();
// map.put("timestamp",timestamp); // map.put("timestamp",timestamp);
// map.put("path",path); // map.put("path",path);
......
...@@ -4,7 +4,6 @@ import android.annotation.SuppressLint ...@@ -4,7 +4,6 @@ import android.annotation.SuppressLint
import android.content.Context import android.content.Context
import android.text.TextUtils import android.text.TextUtils
import com.google.gson.Gson import com.google.gson.Gson
import com.ydl.pushserver.pushagent.YdlPushAgent
import com.ydl.ydlcommon.app.Apm import com.ydl.ydlcommon.app.Apm
import com.ydl.ydlcommon.base.BaseApp import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.bean.AuthBean import com.ydl.ydlcommon.bean.AuthBean
...@@ -28,7 +27,6 @@ import com.ydl.ydlnet.builder.interceptor.log.RequestLogInterceptor ...@@ -28,7 +27,6 @@ import com.ydl.ydlnet.builder.interceptor.log.RequestLogInterceptor
import com.yidianling.common.tools.RxAppTool import com.yidianling.common.tools.RxAppTool
import com.yidianling.common.tools.RxDeviceTool import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import io.reactivex.functions.Action
import okhttp3.* import okhttp3.*
import okio.Buffer import okio.Buffer
import okio.BufferedSink import okio.BufferedSink
...@@ -534,21 +532,6 @@ class HttpConfig { ...@@ -534,21 +532,6 @@ class HttpConfig {
} }
} }
@SuppressLint("CheckResult")
fun initSocketConfig(finallyAction: Action) {
ApiRequestUtil.getJavaGlobalInfo()
.compose(RxUtils.applySchedulers())
.compose(RxUtils.resultJavaData())
.doFinally(finallyAction)
.subscribe({
if (it != null && !TextUtils.isEmpty(it.ip)) {
YdlPushAgent.setDebugAdree(it.ip, it.port.toInt())
}
}) {
LogUtil.i("HttpConfig", it.toString())
}
}
/** /**
* 注册登录动态获取网关 * 注册登录动态获取网关
* *
......
package com.ydl.ydlcommon.utils;
import java.security.MessageDigest;
public class MD5Util {
public static String md5(String str) {
try {
MessageDigest m = MessageDigest.getInstance("MD5");
m.update(str.getBytes("UTF8"));
byte s[] = m.digest();
String result = "";
for (int i = 0; i < s.length; i++) {
result += Integer.toHexString((0x000000FF & s[i]) | 0xFFFFFF00).substring(6);
}
return result;
} catch (Exception e) {
e.printStackTrace();
}
return "";
}
}
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.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.config.YDLConstants;
import com.ydl.ydlcommon.modular.ModularServiceManager;
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.ydl.ydlcommon.utils.DeviceTool.checkHasAgreeSecret;
//import static com.bun.miitmdid.content.ContextKeeper.getApplicationContext;
//import com.ydl.burypointlib.BuryPointHelper;
//埋点工具类
public class YdlBuryPointUtil {
private static Context context;
//初始化
public static void init(Context context1){
init(context1,false);
}
public static void init(Context context1,Boolean isEditAlis){
try {
context = context1;
String appEnv = BaseApp.instance.getGlobalConfig().getAppEnv();
boolean appDebug = BaseApp.instance.getGlobalConfig().getAppDebug();
boolean isTest = YDLConstants.ENV_TEST.equals(appEnv);
if (isTest){
YdlPushAgent.setDebugAdree("121.41.92.140",8091);
}
RegisterEventBean registerEventBean = new RegisterEventBean();
registerEventBean.setAppId(context.getPackageName());
registerEventBean.setAppVersion(RxAppTool.getAppVersionName(context));
String deviceId = "";
if (checkHasAgreeSecret()) {
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");
}
@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();
}catch (Exception e){
e.printStackTrace();
}
}
//重新登录
public static void reLogin(){
try {
RegisterEventBean registerEventBean = new RegisterEventBean();
registerEventBean.setAppId(context.getPackageName());
registerEventBean.setAppVersion(RxAppTool.getAppVersionName(context));
String deviceId ="";
if (checkHasAgreeSecret()) {
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));
YdlPushAgent.reLogin(registerEventBean);
LogUtil.d("reLogin:"+registerEventBean.toString());
}catch (Exception e){
LogUtil.e("reLogin:"+e.getMessage());
}
}
//pv埋点
public static void sendPv(String pageViewId){
YdlPushAgent.sendPvEvent(pageViewId);
LogUtil.d(pageViewId);
}
//click埋点
public static void sendClick(String eventId,String... strings){
com.yidianling.common.tools.LogUtil.d(eventId);
YdlPushAgent.sendClickEvent(eventId,strings);
}
}
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