From 254f3af3c769d67fb82ea67e2d746715fec47ba7 Mon Sep 17 00:00:00 2001 From: 18142669586 <1669783059@qq.com> Date: Thu, 4 Aug 2022 13:30:22 +0800 Subject: [PATCH] 111 --- .../phonelive/activity/LauncherActivity.java | 1 + .../dialog/InstructorOperationDialog.java | 18 ++++++++ .../yunbao/common/http/CommonHttpUtil.java | 4 +- .../imrongcloud/PDMessageInterceptor.java | 43 ++++++++++++++++++- config.gradle | 6 +-- .../activity/MyTUIConversationFragment.java | 1 - .../activity/PDLiveConversationActivity.java | 22 ++++++++++ .../adapter/SystemChatMessageAdapter.java | 1 + .../com/yunbao/live/dialog/NewUserDialog.java | 16 +++++++ .../live/presenter/LiveLinkMicPresenter.java | 39 +++++++++++++++++ .../live/views/InputPanelViewHolder.java | 29 +++++++++++++ live/src/main/res/layout/dialog_live_hd.xml | 2 +- .../yunbao/main/activity/FindPwdActivity.java | 3 ++ .../PDLiveConversationListActivity.java | 17 +++++++- .../main/adapter/SystemMessageAdapter.java | 5 ++- 15 files changed, 197 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java b/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java index 06a335f69..aa2fd57ee 100644 --- a/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java +++ b/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java @@ -238,6 +238,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL } IMLoginModel model = IMLoginManager.get(this).getUserInfo(); if (model != null) { + IMLoginManager.get(this).upDataUserInfo(); //融云连接服务器 RongcloudIMManager.connectIM(this); forwardMainActivity(); diff --git a/common/src/main/java/com/yunbao/common/dialog/InstructorOperationDialog.java b/common/src/main/java/com/yunbao/common/dialog/InstructorOperationDialog.java index e28a439f9..c52a69de4 100644 --- a/common/src/main/java/com/yunbao/common/dialog/InstructorOperationDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/InstructorOperationDialog.java @@ -11,8 +11,14 @@ import androidx.fragment.app.DialogFragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentTransaction; +import com.adjust.sdk.Adjust; +import com.adjust.sdk.AdjustEvent; +import com.facebook.appevents.AppEventsLogger; +import com.google.firebase.analytics.FirebaseAnalytics; import com.yunbao.common.R; import com.yunbao.common.event.InstructorOperationEvent; +import com.yunbao.common.http.CommonHttpUtil; +import com.yunbao.common.http.HttpCallback; import com.yunbao.common.manager.NoviceInstructorManager; import org.greenrobot.eventbus.EventBus; @@ -82,6 +88,18 @@ public class InstructorOperationDialog extends AbsDialogFragment { mRootView.findViewById(R.id.hurry_contact).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { + AdjustEvent adjustEvent1 = new AdjustEvent("82nzkz"); + Adjust.trackEvent(adjustEvent1); + CommonHttpUtil.setAdvertisingChannels("82nzkz", new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0) { + FirebaseAnalytics.getInstance(mContext).logEvent("FS_director_enter", null); + AppEventsLogger.newLogger(mContext).logEvent("FB_director_enter"); + } + } + }); + EventBus.getDefault().post(new InstructorOperationEvent()); dismiss(); } diff --git a/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java b/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java index b93ba123d..72ad270e6 100644 --- a/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java +++ b/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java @@ -4,6 +4,7 @@ import android.content.Context; import android.os.Build; import android.util.Log; +import com.adjust.sdk.Adjust; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.lzy.okgo.OkGo; @@ -393,8 +394,9 @@ public class CommonHttpUtil { //埋点唯一性 public static void setAdvertisingChannels(String operation, HttpCallback callback) { - HttpClient.getInstance().get("Tx.setAdvertisingChannels&marking=safasf", CommonHttpConsts.GET_USER_BASEINFO) + HttpClient.getInstance().get("Tx.setAdvertisingChannels", CommonHttpConsts.GET_USER_BASEINFO) .params("operation", operation) + .params("marking", Adjust.getAdid()) .execute(callback); } diff --git a/common/src/main/java/com/yunbao/common/manager/imrongcloud/PDMessageInterceptor.java b/common/src/main/java/com/yunbao/common/manager/imrongcloud/PDMessageInterceptor.java index 817245f63..7f9a1bbca 100644 --- a/common/src/main/java/com/yunbao/common/manager/imrongcloud/PDMessageInterceptor.java +++ b/common/src/main/java/com/yunbao/common/manager/imrongcloud/PDMessageInterceptor.java @@ -1,14 +1,28 @@ package com.yunbao.common.manager.imrongcloud; +import android.text.TextUtils; import android.util.Log; +import com.adjust.sdk.Adjust; +import com.adjust.sdk.AdjustEvent; +import com.facebook.appevents.AppEventsLogger; +import com.google.firebase.analytics.FirebaseAnalytics; +import com.google.gson.Gson; +import com.yunbao.common.CommonAppContext; +import com.yunbao.common.bean.IMLoginModel; +import com.yunbao.common.http.CommonHttpUtil; +import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.utils.ToastUtil; + import java.util.List; import io.rong.imkit.IMCenter; import io.rong.imkit.MessageInterceptor; +import io.rong.imkit.userinfo.RongUserInfoManager; import io.rong.imlib.RongIMClient; import io.rong.imlib.model.Conversation; import io.rong.imlib.model.Message; +import io.rong.imlib.model.UserInfo; import io.rong.message.TextMessage; /** @@ -26,9 +40,36 @@ public class PDMessageInterceptor implements MessageInterceptor { Log.e("PDMessageInterceptor", textMessage.getContent()); //删除消息 IMCenter.getInstance().deleteRemoteMessages(Conversation.ConversationType.PRIVATE, message.getTargetId(), messages, null); - IMCenter.getInstance().clearMessagesUnreadStatus(Conversation.ConversationType.PRIVATE, message.getTargetId(), null); + IMCenter.getInstance().clearMessagesUnreadStatus(Conversation.ConversationType.PRIVATE, message.getTargetId(), null); + // return true; } + } + //获取用户信息 + UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(message.getTargetId()); + if (null != userInfo) { + if (!TextUtils.isEmpty(userInfo.getExtra())) { + IMLoginModel userBean = new Gson().fromJson(userInfo.getExtra(), IMLoginModel.class); + //新手指导员 + if (!TextUtils.isEmpty(userBean.getIsAdmin()) && TextUtils.equals(userBean.getIsAdmin(), "1")) { + AdjustEvent adjustEvent1 = new AdjustEvent("82nzkz"); + Adjust.trackEvent(adjustEvent1); + CommonHttpUtil.setAdvertisingChannels("82nzkz", new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0) { + FirebaseAnalytics.getInstance(CommonAppContext.sInstance.getApplicationContext()).logEvent("FS_director_enter", null); + AppEventsLogger.newLogger(CommonAppContext.sInstance.getApplicationContext()).logEvent("FB_director_enter"); + } + } + }); + + } else {//非指导员 + + } + Log.e("PDLiveConversation", userInfo.getExtra()); + } + RongIMClient.getInstance().getHistoryMessages(Conversation.ConversationType.PRIVATE, message.getTargetId(), -1, 10, new RongIMClient.ResultCallback>() { diff --git a/config.gradle b/config.gradle index e36818899..d190f2cce 100644 --- a/config.gradle +++ b/config.gradle @@ -9,9 +9,9 @@ ext { ] manifestPlaceholders = [ //正式 -// serverHost : "https://napi.yaoulive.com", -// 測試 - serverHost : "https://ceshi.yaoulive.com", + serverHost : "https://napi.yaoulive.com", + //測試 +// serverHost : "https://ceshi.yaoulive.com", //腾讯地图 txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", diff --git a/live/src/main/java/com/yunbao/live/activity/MyTUIConversationFragment.java b/live/src/main/java/com/yunbao/live/activity/MyTUIConversationFragment.java index ebd8fc05a..b4b7f46cf 100644 --- a/live/src/main/java/com/yunbao/live/activity/MyTUIConversationFragment.java +++ b/live/src/main/java/com/yunbao/live/activity/MyTUIConversationFragment.java @@ -171,7 +171,6 @@ public class MyTUIConversationFragment extends Fragment { if (bean.getContent().equals("在線客服")) { mFirebaseAnalytics.logEvent("FS_customer_service", null); logger.logEvent("FB_customer_service"); - AdjustEvent adjustEvent1 = new AdjustEvent("ww5z2p"); Adjust.trackEvent(adjustEvent1); diff --git a/live/src/main/java/com/yunbao/live/activity/PDLiveConversationActivity.java b/live/src/main/java/com/yunbao/live/activity/PDLiveConversationActivity.java index 40569c9be..a427faf35 100644 --- a/live/src/main/java/com/yunbao/live/activity/PDLiveConversationActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/PDLiveConversationActivity.java @@ -17,12 +17,18 @@ import androidx.core.content.ContextCompat; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentTransaction; +import com.adjust.sdk.Adjust; +import com.adjust.sdk.AdjustEvent; import com.blankj.utilcode.util.GsonUtils; +import com.facebook.appevents.AppEventsLogger; +import com.google.firebase.analytics.FirebaseAnalytics; import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.activity.SelectImageActivity; import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.ImageEntity; import com.yunbao.common.bean.NoviceInstructorModel; +import com.yunbao.common.http.CommonHttpUtil; +import com.yunbao.common.http.HttpCallback; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.NoviceInstructorManager; import com.yunbao.common.manager.imrongcloud.MessageIMManager; @@ -48,6 +54,9 @@ import io.rong.imlib.model.Conversation; import io.rong.imlib.model.UserInfo; import okhttp3.internal.http2.ErrorCode; +import static com.yunbao.common.CommonAppContext.logger; +import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; + /** * 聊天会话界面 */ @@ -104,10 +113,23 @@ public class PDLiveConversationActivity extends AbsActivity implements View.OnCl if (!TextUtils.isEmpty(userBean.getIs_admin()) && TextUtils.equals(userBean.getIs_admin(), "1")) { isAdmin = true; imgMore.setVisibility(View.GONE); + AdjustEvent adjustEvent1 = new AdjustEvent("ww5z2p"); + Adjust.trackEvent(adjustEvent1); + CommonHttpUtil.setAdvertisingChannels("ww5z2p", new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0) { + FirebaseAnalytics.getInstance(mContext).logEvent("FS_customer_service", null); + AppEventsLogger.newLogger(mContext).logEvent("FB_customer_service"); + } + } + }); + } else {//非指导员 isAdmin = false; imgMore.setVisibility(View.VISIBLE); } + inputPanel.setAdmin(isAdmin); Log.e("PDLiveConversation", userInfo.getExtra()); } } else { diff --git a/live/src/main/java/com/yunbao/live/adapter/SystemChatMessageAdapter.java b/live/src/main/java/com/yunbao/live/adapter/SystemChatMessageAdapter.java index a7c5a346b..1251f6471 100644 --- a/live/src/main/java/com/yunbao/live/adapter/SystemChatMessageAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/SystemChatMessageAdapter.java @@ -19,6 +19,7 @@ import com.google.firebase.analytics.FirebaseAnalytics; import com.yunbao.common.activity.WebViewActivity; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.manager.imrongcloud.MessageIMManager; +import com.yunbao.common.utils.ToastUtil; import com.yunbao.live.R; import com.yunbao.live.activity.SystemMessageActivity; import com.yunbao.live.bean.ImUserBean; diff --git a/live/src/main/java/com/yunbao/live/dialog/NewUserDialog.java b/live/src/main/java/com/yunbao/live/dialog/NewUserDialog.java index fba1ad136..e43561ade 100644 --- a/live/src/main/java/com/yunbao/live/dialog/NewUserDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/NewUserDialog.java @@ -14,9 +14,14 @@ import androidx.fragment.app.DialogFragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentTransaction; +import com.adjust.sdk.Adjust; +import com.adjust.sdk.AdjustEvent; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.facebook.appevents.AppEventsLogger; +import com.google.firebase.analytics.FirebaseAnalytics; import com.yunbao.common.dialog.AbsDialogFragment; +import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.ToastUtil; @@ -110,6 +115,17 @@ public class NewUserDialog extends AbsDialogFragment { btn_confirm.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { + AdjustEvent adjustEvent1 = new AdjustEvent("a50ofs"); + Adjust.trackEvent(adjustEvent1); + CommonHttpUtil.setAdvertisingChannels("a50ofs", new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0) { + FirebaseAnalytics.getInstance(getContext()).logEvent("FS_newbie_reward", null); + AppEventsLogger.newLogger(getContext()).logEvent("FB_newbie_reward"); + } + } + }); EventBus.getDefault().post("showBanner"); EventBus.getDefault().post("svga_new_user_gif"); IMLoginManager.get(mContext).setNewUserGif(true); diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java index 1ab1813d7..a1d229b98 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java @@ -22,8 +22,12 @@ import android.widget.PopupWindow; import android.widget.TextView; import android.widget.Toast; +import com.adjust.sdk.Adjust; +import com.adjust.sdk.AdjustEvent; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.facebook.appevents.AppEventsLogger; +import com.google.firebase.analytics.FirebaseAnalytics; import com.ms.banner.Banner; import com.ms.banner.BannerConfig; import com.ms.banner.holder.BannerViewHolder; @@ -35,6 +39,7 @@ import com.yunbao.common.bean.LevelBean; import com.yunbao.common.bean.LiveGiftBean; import com.yunbao.common.bean.UserBean; import com.yunbao.common.glide.ImgLoader; +import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpClient; import com.yunbao.common.manager.IMLoginManager; @@ -136,6 +141,17 @@ public class LiveLinkMicPresenter implements View.OnClickListener { if ("showBanner".equals(str)) { showBanner3(); } else if ("stop_svga_new_user_double".equals(str) && mBannerList3.size() > 3) { + AdjustEvent adjustEvent1 = new AdjustEvent("80lzdi"); + Adjust.trackEvent(adjustEvent1); + CommonHttpUtil.setAdvertisingChannels("80lzdi", new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0) { + FirebaseAnalytics.getInstance(mContext).logEvent("FS_mission_3", null); + AppEventsLogger.newLogger(mContext).logEvent("FB_mission_3"); + } + } + }); mBannerList3.get(2).setLink("1"); mBanner3.update(mBannerList3); if (mBannerList3.get(0).getLink().equals("1")) { @@ -147,6 +163,17 @@ public class LiveLinkMicPresenter implements View.OnClickListener { } } else if ("stop_svga_new_user_follow".equals(str)&& mBannerList3.size() > 2) { mBannerList3.get(1).setLink("1"); + AdjustEvent adjustEvent1 = new AdjustEvent("f084wh"); + Adjust.trackEvent(adjustEvent1); + CommonHttpUtil.setAdvertisingChannels("f084wh", new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0) { + FirebaseAnalytics.getInstance(mContext).logEvent("FS_mission_2", null); + AppEventsLogger.newLogger(mContext).logEvent("FB_mission_2"); + } + } + }); mBanner3.update(mBannerList3); if (mBannerList3.get(0).getLink().equals("1")) { if (mBannerList3.get(1).getLink().equals("1")) { @@ -156,6 +183,17 @@ public class LiveLinkMicPresenter implements View.OnClickListener { } } } else if ("stop_new_user_gif".equals(str)&& mBannerList3.size() > 1) { + AdjustEvent adjustEvent1 = new AdjustEvent("aqqz70"); + Adjust.trackEvent(adjustEvent1); + CommonHttpUtil.setAdvertisingChannels("aqqz70", new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0) { + FirebaseAnalytics.getInstance(mContext).logEvent("FS_mission_1", null); + AppEventsLogger.newLogger(mContext).logEvent("FB_mission_1"); + } + } + }); IMLoginManager.get(mContext).setNewUserGif(false); mBannerList3.get(0).setLink("1"); mBanner3.update(mBannerList3); @@ -313,6 +351,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener { if (IMLoginManager.get(mContext).isisNewUserOne() == false) { if (obj.getString("sendgift").equals("0")) { + IMLoginManager.get(mContext).setNewUserGif(true); EventBus.getDefault().post("svga_new_user_gif"); } } diff --git a/live/src/main/java/com/yunbao/live/views/InputPanelViewHolder.java b/live/src/main/java/com/yunbao/live/views/InputPanelViewHolder.java index 6e9fd6c4a..a62ddc2c6 100644 --- a/live/src/main/java/com/yunbao/live/views/InputPanelViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/InputPanelViewHolder.java @@ -16,6 +16,12 @@ import android.widget.LinearLayout; import androidx.annotation.Nullable; +import com.adjust.sdk.Adjust; +import com.adjust.sdk.AdjustEvent; +import com.facebook.appevents.AppEventsLogger; +import com.google.firebase.analytics.FirebaseAnalytics; +import com.yunbao.common.http.CommonHttpUtil; +import com.yunbao.common.http.HttpCallback; import com.yunbao.common.manager.NoviceInstructorManager; import com.yunbao.common.utils.FileUtil; import com.yunbao.common.utils.TimeUtils; @@ -47,6 +53,11 @@ public class InputPanelViewHolder extends LinearLayout implements View.OnClickLi private LinearLayout pluginList; //接口返回预置信息 private String presetInformation = ""; + private boolean isAdmin = false; + + public void setAdmin(boolean admin) { + isAdmin = admin; + } public InputPanelViewHolder setPresetInformation(String presetInformation) { this.presetInformation = presetInformation; @@ -164,6 +175,24 @@ public class InputPanelViewHolder extends LinearLayout implements View.OnClickLi @Override public void onSuccess(Message message) { + if(isAdmin){ + AdjustEvent adjustEvent1 = new AdjustEvent("2kjbwx"); + Adjust.trackEvent(adjustEvent1); + CommonHttpUtil.setAdvertisingChannels("2kjbwx", new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0) { + FirebaseAnalytics.getInstance(getContext()).logEvent("FS_director_first_chat", null); + AppEventsLogger.newLogger(getContext()).logEvent("FB_director_first_chat"); + } + } + }); + AdjustEvent adjustEvent2 = new AdjustEvent("g9lzss"); + Adjust.trackEvent(adjustEvent2); + FirebaseAnalytics.getInstance(getContext()).logEvent("FS_director_chat", null); + AppEventsLogger.newLogger(getContext()).logEvent("FB_director_chat"); + } + IMCenter.getInstance().clearTextMessageDraft(Conversation.ConversationType.PRIVATE, targetId, null); } diff --git a/live/src/main/res/layout/dialog_live_hd.xml b/live/src/main/res/layout/dialog_live_hd.xml index 96bc3c507..f0338b0be 100644 --- a/live/src/main/res/layout/dialog_live_hd.xml +++ b/live/src/main/res/layout/dialog_live_hd.xml @@ -47,6 +47,6 @@ + android:layout_height="match_parent"/> \ No newline at end of file diff --git a/main/src/main/java/com/yunbao/main/activity/FindPwdActivity.java b/main/src/main/java/com/yunbao/main/activity/FindPwdActivity.java index 600124e07..29ffb3ab1 100644 --- a/main/src/main/java/com/yunbao/main/activity/FindPwdActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/FindPwdActivity.java @@ -19,11 +19,13 @@ import android.widget.TextView; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.blankj.utilcode.util.DeviceUtils; +import com.blankj.utilcode.util.GsonUtils; import com.sahooz.library.Country; import com.sahooz.library.CountryPicker; import com.sahooz.library.OnPick; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.activity.AbsActivity; +import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.UserBean; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.interfaces.CommonCallback; @@ -343,6 +345,7 @@ public class FindPwdActivity extends AbsActivity { JSONObject obj = JSON.parseObject(info[0]); String uid = obj.getString("id"); String token = obj.getString("token"); + IMLoginModel model = GsonUtils.fromJson(info[0], IMLoginModel.class); CommonAppConfig.getInstance().setLoginInfo(uid, token, true); getBaseUserInfo(); } else { diff --git a/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java b/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java index f93a7504b..75a8128e5 100644 --- a/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java @@ -13,12 +13,17 @@ import androidx.fragment.app.FragmentTransaction; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; +import com.adjust.sdk.Adjust; +import com.adjust.sdk.AdjustEvent; import com.alibaba.fastjson.JSON; +import com.facebook.appevents.AppEventsLogger; +import com.google.firebase.analytics.FirebaseAnalytics; import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.bean.ImUserInfoModel; import com.yunbao.common.custom.TabButtonGroup; import com.yunbao.common.event.MessageIMEvent; import com.yunbao.common.event.UpdateTablePointMe; +import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.imrongcloud.MessageIMManager; @@ -83,7 +88,17 @@ public class PDLiveConversationListActivity extends AbsActivity { container = findViewById(R.id.container); redPoint = findViewById(R.id.v_table_redpoint); redpointMe = findViewById(R.id.v_table_redpoint_me); - + AdjustEvent adjustEvent2 = new AdjustEvent("ykpmj8"); + Adjust.trackEvent(adjustEvent2); + CommonHttpUtil.setAdvertisingChannels("ykpmj8", new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0) { + FirebaseAnalytics.getInstance(PDLiveConversationListActivity.this).logEvent("FS_director_message_box", null); + AppEventsLogger.newLogger(PDLiveConversationListActivity.this).logEvent("FB_director_message_box"); + } + } + }); mTabButtonGroup.setCurPosition(2); findViewById(R.id.btn_start).setOnClickListener(v -> { //防止重新加载多个 diff --git a/main/src/main/java/com/yunbao/main/adapter/SystemMessageAdapter.java b/main/src/main/java/com/yunbao/main/adapter/SystemMessageAdapter.java index ab0974698..edead0f16 100644 --- a/main/src/main/java/com/yunbao/main/adapter/SystemMessageAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/SystemMessageAdapter.java @@ -21,6 +21,7 @@ import com.yunbao.common.activity.WebViewActivity; import com.yunbao.common.bean.ImUserInfoModel; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.manager.imrongcloud.MessageIMManager; +import com.yunbao.common.utils.ToastUtil; import com.yunbao.live.activity.SystemMessageActivity; import com.yunbao.live.bean.ImUserBean; import com.yunbao.main.R; @@ -88,12 +89,12 @@ public class SystemMessageAdapter extends RecyclerView.Adapter { messageViewHolder.setViewHolderOnClickListener((view, model1) -> { mPosition = position; netHandler.post(updataRunable); - if (model1.getContent().equals("在線客服")) { + if (model1.getTitle().equals("在線客服")) { FirebaseAnalytics.getInstance(mContext).logEvent("FS_customer_service", null); AppEventsLogger.newLogger(mContext).logEvent("FB_customer_service"); AdjustEvent adjustEvent1 = new AdjustEvent("ww5z2p"); Adjust.trackEvent(adjustEvent1); - } else if (model1.getContent().equals("新手指導員")) { + } else if (model1.getTitle().equals("新手指導員")) { FirebaseAnalytics.getInstance(mContext).logEvent("FS_guide", null); AppEventsLogger.newLogger(mContext).logEvent("FB_guide", null); AdjustEvent adjustEvent1 = new AdjustEvent("m0nfpn");