From 6e36e15ef33f478e94e767ef4dc693569cab8002 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 23 Nov 2022 17:16:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=9F=8B=E7=82=B9=EF=BC=88ad?= =?UTF-8?q?just-android=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/shayu/phonelive/AppContext.java | 41 +--- .../phonelive/activity/LauncherActivity.java | 15 -- common/build.gradle | 1 - .../com/yunbao/common/CommonAppContext.java | 51 ++--- .../dialog/InstructorOperationDialog.java | 52 +---- .../yunbao/common/http/CommonHttpUtil.java | 17 +- .../imrongcloud/PDMessageInterceptor.java | 14 +- live/src/main/AndroidManifest.xml | 1 + .../live/activity/LiveAudienceActivity.java | 4 - .../activity/MyTUIConversationFragment.java | 17 +- .../activity/PDLiveConversationActivity.java | 19 -- .../live/activity/ZhuangBanActivity.java | 11 +- .../adapter/SystemChatMessageAdapter.java | 7 +- .../live/dialog/LiveGameDialogFragment.java | 11 +- .../live/dialog/LiveGiftDialogFragment.java | 9 +- .../live/dialog/LiveHDDialogFragment.java | 13 +- .../com/yunbao/live/dialog/NewUserDialog.java | 17 -- .../PDLIiveChatConversationFragment.java | 20 +- .../live/presenter/LiveLinkMicPresenter.java | 81 +------ .../yunbao/live/socket/SocketRyChatUtil.java | 23 -- .../live/views/InputPanelViewHolder.java | 19 +- .../yunbao/live/views/LiveRoomViewHolder.java | 11 +- .../live/views/PortraitLiveManager.java | 67 ------ .../yunbao/main/activity/EntryActivity.java | 213 ++---------------- .../yunbao/main/activity/GoogleFragment.java | 52 +---- .../yunbao/main/activity/LoginActivity.java | 43 +--- .../main/activity/MyWalletActivity.java | 9 - .../main/activity/MyWebViewActivity.java | 12 - .../main/activity/OneLoginActivity.java | 38 +--- .../PDLiveConversationListActivity.java | 4 - .../main/activity/RegisterActivity.java | 73 +----- .../main/activity/ZhuangBanActivity.java | 11 - .../main/adapter/SystemMessageAdapter.java | 5 - .../yunbao/main/dialog/OneLoginDialog.java | 25 +- .../main/views/MainMessageViewHolder.java | 5 - 35 files changed, 104 insertions(+), 907 deletions(-) diff --git a/app/src/main/java/com/shayu/phonelive/AppContext.java b/app/src/main/java/com/shayu/phonelive/AppContext.java index 4818972de..4cc9e4c31 100644 --- a/app/src/main/java/com/shayu/phonelive/AppContext.java +++ b/app/src/main/java/com/shayu/phonelive/AppContext.java @@ -17,10 +17,6 @@ import android.util.Log; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import com.adjust.sdk.Adjust; -import com.adjust.sdk.AdjustConfig; -import com.adjust.sdk.AdjustEvent; -import com.adjust.sdk.LogLevel; import com.alibaba.android.arouter.launcher.ARouter; import com.blankj.utilcode.util.Utils; import com.facebook.appevents.AppEventsLogger; @@ -38,8 +34,6 @@ import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppContext; import com.yunbao.common.Constants; import com.yunbao.common.bean.CrashSaveBean; -import com.yunbao.common.http.CommonHttpUtil; -import com.yunbao.common.http.HttpCallback; import com.yunbao.common.manager.imrongcloud.InstructorSendReward; import com.yunbao.common.manager.imrongcloud.InstructorSendRewardProvider; import com.yunbao.common.manager.imrongcloud.MessageIMManager; @@ -47,7 +41,6 @@ import com.yunbao.common.manager.imrongcloud.RecommendLiveRoom; import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; import com.yunbao.common.utils.L; import com.yunbao.common.utils.SpUtil; -import com.yunbao.faceunity.FaceManager; import com.yunbao.live.socket.SocketRyClient; import com.yunbao.live.utils.LiveImDeletUtil; import com.yunbao.live.views.PortraitLiveManager; @@ -87,12 +80,10 @@ public class AppContext extends CommonAppContext { private static final class AdjustLifecycleCallbacks implements ActivityLifecycleCallbacks { @Override public void onActivityResumed(Activity activity) { - Adjust.onResume(); } @Override public void onActivityPaused(Activity activity) { - Adjust.onPause(); } @Override @@ -163,38 +154,8 @@ public class AppContext extends CommonAppContext { OpenInstall.init(this); } - String environment = AdjustConfig.ENVIRONMENT_PRODUCTION; - AdjustConfig config = new AdjustConfig(this, "3om5fbglyqdc", environment); - if (CommonAppConfig.IS_GOOGLE_PLAY == false) { - config.setDefaultTracker("xa7k5ut"); - } - Adjust.onCreate(config); + registerActivityLifecycleCallbacks(new AdjustLifecycleCallbacks()); - config.setLogLevel(LogLevel.WARN); - //激活操作记录 - AdjustEvent adjustEvent = new AdjustEvent("m7wk0c"); - Adjust.trackEvent(adjustEvent); - - //谷歌激活 - mFirebaseAnalytics.logEvent("FS_activation", null); - - //FB激活 - logger.logEvent("FB_activation"); - - AdjustEvent adjustEvent2 = new AdjustEvent("p7igfz"); - Adjust.trackEvent(adjustEvent2); - CommonHttpUtil.setAdvertisingChannels("p7igfz", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - //谷歌激活 - mFirebaseAnalytics.logEvent("FS_complete_1st_loading", null); - //FB激活 - logger.logEvent("FB_complete_1st_loading"); - } - } - }); - //初始化 AndroidUtilCode Utils.init(this); liveImDeletUtil = new LiveImDeletUtil(); 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 c459c9ed2..371732ef7 100644 --- a/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java +++ b/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java @@ -1,10 +1,6 @@ package com.shayu.phonelive.activity; -import static com.yunbao.common.CommonAppContext.logger; -import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; -import android.Manifest; -import android.app.Dialog; import android.content.Context; import android.content.Intent; import android.os.Build; @@ -25,8 +21,6 @@ import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.core.app.NotificationManagerCompat; -import com.adjust.sdk.Adjust; -import com.adjust.sdk.AdjustEvent; import com.alibaba.android.arouter.facade.annotation.Route; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; @@ -50,7 +44,6 @@ import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.interfaces.CommonCallback; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; -import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DownloadUtil; import com.yunbao.common.utils.L; import com.yunbao.common.utils.LogUtil; @@ -111,14 +104,6 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL EventBus.getDefault().register(this); setStatusBar(); setContentView(R.layout.activity_launcher); - //开屏 - AdjustEvent adjustEvent = new AdjustEvent("vjqk8g"); - Adjust.trackEvent(adjustEvent); - - //谷歌激活 - mFirebaseAnalytics.logEvent("FS_screen", null); - //FB激活 - logger.logEvent("FB_screen"); mContext = this; mRoot = findViewById(R.id.root); mCover = findViewById(R.id.cover); diff --git a/common/build.gradle b/common/build.gradle index a0649a127..ba71ce7f2 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -168,7 +168,6 @@ dependencies { transitive = true } api 'com.linecorp:linesdk:5.0.1' - api 'com.adjust.sdk:adjust-android:4.30.1' api 'com.android.installreferrer:installreferrer:2.2' //Retrofit2库 api 'com.squareup.retrofit2:retrofit:2.3.0' diff --git a/common/src/main/java/com/yunbao/common/CommonAppContext.java b/common/src/main/java/com/yunbao/common/CommonAppContext.java index 62a44695a..45973c2f7 100644 --- a/common/src/main/java/com/yunbao/common/CommonAppContext.java +++ b/common/src/main/java/com/yunbao/common/CommonAppContext.java @@ -1,19 +1,18 @@ package com.yunbao.common; +import static com.facebook.FacebookSdk.setAdvertiserIDCollectionEnabled; +import static com.facebook.FacebookSdk.setAutoLogAppEventsEnabled; + import android.app.Activity; import android.content.Context; import android.os.Build; import android.os.Bundle; +import android.util.Log; + import androidx.multidex.MultiDex; import androidx.multidex.MultiDexApplication; -import android.text.TextUtils; -import android.util.Log; - import com.facebook.FacebookSdk; -import com.facebook.appevents.AppEventsLogger; -import com.google.android.gms.common.api.ApiException; -import com.google.firebase.analytics.FirebaseAnalytics; import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.utils.L; @@ -24,9 +23,6 @@ import io.rong.push.RongPushClient; import io.rong.push.pushconfig.PushConfig; import me.leolin.shortcutbadger.ShortcutBadger; -import static com.facebook.FacebookSdk.setAdvertiserIDCollectionEnabled; -import static com.facebook.FacebookSdk.setAutoLogAppEventsEnabled; - /** * Created by cxf on 2017/8/3. @@ -40,8 +36,6 @@ public class CommonAppContext extends MultiDexApplication { public static int jpushMsgNum; public static int Ingroup = 0; public static String lang = "chinese"; - public static FirebaseAnalytics mFirebaseAnalytics; - public static AppEventsLogger logger; public static boolean isReady = false; public static String home_zdy_img_us = ""; public static String home_zdy_img_cn = ""; @@ -67,30 +61,23 @@ public class CommonAppContext extends MultiDexApplication { //初始化友盟统计 // UMConfigure.init(this, UMConfigure.DEVICE_TYPE_PHONE, null); FacebookSdk.sdkInitialize(getApplicationContext()); - mFirebaseAnalytics = FirebaseAnalytics.getInstance(this); - mFirebaseAnalytics.setAnalyticsCollectionEnabled(true); - mFirebaseAnalytics.setUserProperty("ALLOW_AD_PERSONALIZATION_SIGNALS", "true" ); - - - - logger = AppEventsLogger.newLogger(this); setAutoLogAppEventsEnabled(true); FacebookSdk.fullyInitialize(); setAdvertiserIDCollectionEnabled(true); registerActivityLifecycleCallbacks(); - Locale locale; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { - locale = getResources().getConfiguration().getLocales().get(0); - } else { - locale = getResources().getConfiguration().locale; - } - if(locale.getLanguage().equals("en")){ - lang = "english"; - }else{ - lang = "chinese"; - } - Log.i("lang",lang); + Locale locale; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { + locale = getResources().getConfiguration().getLocales().get(0); + } else { + locale = getResources().getConfiguration().locale; + } + if (locale.getLanguage().equals("en")) { + lang = "english"; + } else { + lang = "chinese"; + } + Log.i("lang", lang); } @@ -114,8 +101,8 @@ public class CommonAppContext extends MultiDexApplication { if (!mFront) { mFront = true; L.e("AppContext------->处于前台"); - ShortcutBadger.applyCount(activity,0); - jpushMsgNum=0; + ShortcutBadger.applyCount(activity, 0); + jpushMsgNum = 0; CommonAppConfig.getInstance().setFrontGround(true); } } 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 c7dc2c6aa..93cb3691b 100644 --- a/common/src/main/java/com/yunbao/common/dialog/InstructorOperationDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/InstructorOperationDialog.java @@ -1,5 +1,9 @@ package com.yunbao.common.dialog; +import static com.yunbao.common.CommonAppContext.home_zdy_img_cn; +import static com.yunbao.common.CommonAppContext.home_zdy_img_us; +import static com.yunbao.common.CommonAppContext.lang; + import android.os.Bundle; import android.view.Gravity; import android.view.View; @@ -12,30 +16,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.CommonAppConfig; import com.yunbao.common.R; import com.yunbao.common.event.InstructorOperationEvent; 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; -import com.yunbao.common.manager.NoviceInstructorManager; import org.greenrobot.eventbus.EventBus; import java.lang.reflect.Field; -import static com.yunbao.common.CommonAppContext.home_zdy_img_cn; -import static com.yunbao.common.CommonAppContext.home_zdy_img_us; -import static com.yunbao.common.CommonAppContext.lang; - public class InstructorOperationDialog extends AbsDialogFragment { @Override @@ -96,40 +84,16 @@ public class InstructorOperationDialog extends AbsDialogFragment { public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); ImageView to_msg = mRootView.findViewById(R.id.to_msg); - if(lang.equals("english")){ - ImgLoader.display(mContext,home_zdy_img_us, to_msg); - }else{ - ImgLoader.display(mContext,home_zdy_img_cn, to_msg); + if (lang.equals("english")) { + ImgLoader.display(mContext, home_zdy_img_us, to_msg); + } else { + ImgLoader.display(mContext, home_zdy_img_cn, to_msg); } mRootView.findViewById(R.id.to_msg).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"); - } - } - }); - - 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(mContext).logEvent("FS_director_message_box", null); - AppEventsLogger.newLogger(mContext).logEvent("FB_director_message_box"); - } - } - }); - 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 af8e85523..490a9d61d 100644 --- a/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java +++ b/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java @@ -4,7 +4,6 @@ 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.JSONArray; import com.alibaba.fastjson.JSONObject; @@ -417,14 +416,14 @@ public class CommonHttpUtil { .params("touid", touid) .execute(callback); } - - //埋点唯一性 - public static void setAdvertisingChannels(String operation, HttpCallback callback) { - HttpClient.getInstance().get("Tx.setAdvertisingChannels", CommonHttpConsts.GET_USER_BASEINFO) - .params("operation", operation) - .params("marking", Adjust.getAdid()) - .execute(callback); - } +// +// //埋点唯一性 +// public static void setAdvertisingChannels(String operation, HttpCallback callback) { +// 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 c07379eee..ac9f16792 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 @@ -3,16 +3,8 @@ 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; @@ -41,7 +33,7 @@ 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; } @@ -53,7 +45,7 @@ public class PDMessageInterceptor implements MessageInterceptor { IMLoginModel userBean = new Gson().fromJson(userInfo.getExtra(), IMLoginModel.class); //新手指导员 if (!TextUtils.isEmpty(userBean.getIsAdmin()) && TextUtils.equals(userBean.getIsAdmin(), "1")) { - //wow + //wow } else {//非指导员 @@ -71,7 +63,7 @@ public class PDMessageInterceptor implements MessageInterceptor { */ @Override public void onSuccess(List messages) { - if (messages.size() == 0||(messages.size()==1&&((TextMessage) messages.get(0).getContent()).getContent().contains("LivePK"))) { + if (messages.size() == 0 || (messages.size() == 1 && ((TextMessage) messages.get(0).getContent()).getContent().contains("LivePK"))) { IMCenter.getInstance().removeConversation(Conversation.ConversationType.PRIVATE, message.getTargetId(), null); } } diff --git a/live/src/main/AndroidManifest.xml b/live/src/main/AndroidManifest.xml index a94f66af7..d780e2f5e 100644 --- a/live/src/main/AndroidManifest.xml +++ b/live/src/main/AndroidManifest.xml @@ -3,6 +3,7 @@ xmlns:tools="http://schemas.android.com/tools" package="com.yunbao.live"> + mSelectImages = new ArrayList<>(); private boolean isAdmin = false; + @Override protected int getLayoutId() { return R.layout.fragment_chat_conversation; @@ -139,18 +134,6 @@ public class PDLIiveChatConversationFragment extends AbsDialogFragment implement if (!TextUtils.isEmpty(userBean.getIs_admin()) && TextUtils.equals(userBean.getIs_admin(), "1")) { isAdmin = true; imgMore.setVisibility(View.GONE); - AdjustEvent adjustEvent1 = new AdjustEvent("exlgn3"); - Adjust.trackEvent(adjustEvent1); - CommonHttpUtil.setAdvertisingChannels("exlgn3", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - FirebaseAnalytics.getInstance(mContext).logEvent("FS_director_read", null); - AppEventsLogger.newLogger(mContext).logEvent("FB_director_read"); - } - } - }); - } else {//非指导员 isAdmin = false; imgMore.setVisibility(View.VISIBLE); @@ -202,6 +185,7 @@ public class PDLIiveChatConversationFragment extends AbsDialogFragment implement startActivityForResult(intent, SELECT_IMAGE_REQUEST); } } + /** * 获取草稿箱信息系 */ 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 8855e7d8a..adab13ca6 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java @@ -1,7 +1,6 @@ package com.yunbao.live.presenter; import android.Manifest; -import android.annotation.SuppressLint; import android.app.Activity; import android.app.Dialog; import android.content.Context; @@ -20,19 +19,15 @@ 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.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; import com.yunbao.common.bean.BannerBean; import com.yunbao.common.bean.LevelBean; 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.utils.ClickUtil; @@ -117,82 +112,10 @@ public class LiveLinkMicPresenter implements View.OnClickListener { @Subscribe(threadMode = ThreadMode.MAIN) public void onUpdata(String str) { if ("stop_svga_new_user_double1".equals(str)) { - AdjustEvent adjustEvent1 = new AdjustEvent("80lzdi"); - Adjust.trackEvent(adjustEvent1); - CommonHttpUtil.setAdvertisingChannels("80lzdi", new HttpCallback() { - @SuppressLint("MissingPermission") - @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"); - } - } - }); - AdjustEvent adjustEvent2 = new AdjustEvent("6va52i"); - Adjust.trackEvent(adjustEvent2); - CommonHttpUtil.setAdvertisingChannels("6va52i", new HttpCallback() { - @SuppressLint("MissingPermission") - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - FirebaseAnalytics.getInstance(mContext).logEvent("FS_mission_either", null); - AppEventsLogger.newLogger(mContext).logEvent("FB_mission_either"); - } - } - }); publicToast(mContext); } else if ("stop_svga_new_user_follow1".equals(str)) { - AdjustEvent adjustEvent1 = new AdjustEvent("f084wh"); - Adjust.trackEvent(adjustEvent1); - CommonHttpUtil.setAdvertisingChannels("f084wh", new HttpCallback() { - @SuppressLint("MissingPermission") - @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"); - } - } - }); - AdjustEvent adjustEvent2 = new AdjustEvent("6va52i"); - Adjust.trackEvent(adjustEvent2); - CommonHttpUtil.setAdvertisingChannels("6va52i", new HttpCallback() { - @SuppressLint("MissingPermission") - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - FirebaseAnalytics.getInstance(mContext).logEvent("FS_mission_either", null); - AppEventsLogger.newLogger(mContext).logEvent("FB_mission_either"); - } - } - }); publicToast(mContext); } else if ("stop_new_user_gif1".equals(str)) { - AdjustEvent adjustEvent1 = new AdjustEvent("aqqz70"); - Adjust.trackEvent(adjustEvent1); - CommonHttpUtil.setAdvertisingChannels("aqqz70", new HttpCallback() { - @SuppressLint("MissingPermission") - @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"); - } - } - }); - AdjustEvent adjustEvent2 = new AdjustEvent("6va52i"); - Adjust.trackEvent(adjustEvent2); - CommonHttpUtil.setAdvertisingChannels("6va52i", new HttpCallback() { - @SuppressLint("MissingPermission") - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - FirebaseAnalytics.getInstance(mContext).logEvent("FS_mission_either", null); - AppEventsLogger.newLogger(mContext).logEvent("FB_mission_either"); - } - } - }); publicToast(mContext); } } @@ -857,6 +780,6 @@ public class LiveLinkMicPresenter implements View.OnClickListener { } public void setLiveSdk(int mLiveSDK) { - this.mLiveSdk=mLiveSDK; + this.mLiveSdk = mLiveSDK; } } diff --git a/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java b/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java index 4e3deaeff..17a1df676 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java @@ -1,18 +1,13 @@ package com.yunbao.live.socket; -import static com.yunbao.common.CommonAppContext.logger; -import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; import android.util.Log; -import com.adjust.sdk.Adjust; -import com.adjust.sdk.AdjustEvent; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppContext; import com.yunbao.common.Constants; import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.UserBean; -import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.ToastUtil; @@ -130,24 +125,6 @@ public class SocketRyChatUtil { @Override public void onSuccess(Message message) { - Log.i("tx", "ssss" + "发送成功" + mLiveUid); - //首发言成功 - AdjustEvent adjustEvent1 = new AdjustEvent("j7isvr"); - Adjust.trackEvent(adjustEvent1); - CommonHttpUtil.setAdvertisingChannels("j7isvr", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - mFirebaseAnalytics.logEvent("FS_liveinteraction", null); - logger.logEvent("FB_liveinteraction "); - } - } - }); - - mFirebaseAnalytics.logEvent("FS_type_interaction", null); - logger.logEvent("FB_type_interaction"); - AdjustEvent adjustEvent = new AdjustEvent("cs6j0s"); - Adjust.trackEvent(adjustEvent); if (SocketRyClient.mSocketHandler != null) { SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); } 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 a62ddc2c6..3aa7e9c11 100644 --- a/live/src/main/java/com/yunbao/live/views/InputPanelViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/InputPanelViewHolder.java @@ -16,12 +16,8 @@ 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; @@ -175,20 +171,7 @@ 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); + if (isAdmin) { FirebaseAnalytics.getInstance(getContext()).logEvent("FS_director_chat", null); AppEventsLogger.newLogger(getContext()).logEvent("FB_director_chat"); } diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index f14e7c04d..47000f5df 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -1,7 +1,5 @@ package com.yunbao.live.views; -import static com.yunbao.common.CommonAppContext.logger; -import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; import static com.yunbao.live.bean.LiveChatBean.RECOMMEND_CARD_NOTIFY; import android.app.Activity; @@ -38,8 +36,6 @@ import androidx.constraintlayout.widget.ConstraintLayout; 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.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; @@ -1947,7 +1943,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void run() { goto_room_view.setVisibility(View.VISIBLE); touid = touids; - pkUid=touids; + pkUid = touids; ImgLoader.displayAvatar(mContext, url, avatarOther); tv_avatarOther_name.setText(name); goto_room_view.setOnClickListener(new View.OnClickListener() { @@ -2309,11 +2305,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis @Override public void callback(Integer isAttention) { if (isAttention == 1) { - mFirebaseAnalytics.logEvent("FS_Follow", null); - logger.logEvent("FB_Follow", null); - AdjustEvent adjustEvent1 = new AdjustEvent("oess6a"); - Adjust.trackEvent(adjustEvent1); -// SocketChatUtil.sendSystemMessage(mLiveUid, CommonAppConfig.getInstance().getUserBean().getUserNiceName() + WordUtil.getString(R.string.live_follow_anchor)); LiveActivity.sendSystemMessage( CommonAppConfig.getInstance().getUserBean().getUserNiceName() + WordUtil.getString(R.string.live_follow_anchor)); } diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index 52ca4a8e2..efa2a967f 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -1,7 +1,5 @@ package com.yunbao.live.views; -import static com.yunbao.common.CommonAppContext.logger; -import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; import static com.yunbao.live.views.LivePlayRyViewHolder.Micing; import static com.yunbao.live.views.LiveRoomViewHolder.isStayRoomfive; @@ -23,13 +21,10 @@ import androidx.annotation.NonNull; import androidx.drawerlayout.widget.DrawerLayout; import androidx.viewpager.widget.PagerAdapter; -import com.adjust.sdk.Adjust; -import com.adjust.sdk.AdjustEvent; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.blankj.utilcode.util.GsonUtils; -import com.facebook.appevents.AppEventsLogger; import com.lzf.easyfloat.EasyFloat; import com.lzf.easyfloat.permission.PermissionUtils; import com.lzf.easyfloat.utils.LifecycleUtils; @@ -446,8 +441,6 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe @Override public void onResume() { -// if (mLivePlayViewHolder != null) -// mLivePlayViewHolder.onResume(); //判断是否有直播悬浮窗,有直接关闭 if (EasyFloat.isShow("LiveFloatView")) { EasyFloat.dismiss("LiveFloatView", true); @@ -1141,66 +1134,6 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe .setmDanMuLevel(mDanMuLevel) .setLiveBg(liveBg))); - - //进入直播间 - AdjustEvent adjustEvent1 = new AdjustEvent("hiepcu"); - Adjust.trackEvent(adjustEvent1); - mFirebaseAnalytics.logEvent("FS_enterroom", null); - logger.logEvent("FB_enterroom"); - - AdjustEvent adjustEvent2 = new AdjustEvent("unutgg"); - Adjust.trackEvent(adjustEvent2); - CommonHttpUtil.setAdvertisingChannels("unutgg", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - mFirebaseAnalytics.logEvent("FS_first_Enterroom", null); - AppEventsLogger.newLogger(mContext).logEvent("FB_first_Enterroom"); - } - } - }); - - //观看1分钟 - if (obj.getLongValue("see_time") >= 60) { - AdjustEvent good_user = new AdjustEvent("7zxuxz"); - Adjust.trackEvent(good_user); - CommonHttpUtil.setAdvertisingChannels("7zxuxz", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - mFirebaseAnalytics.logEvent("FS_enter_app_1min", null); - logger.logEvent("FB_enter_app_1min", null); - } - } - }); - } - if (obj.getLongValue("see_time") >= 600 && obj.getIntValue("un_charge") == 1) { - AdjustEvent good_user = new AdjustEvent("val8lv"); - Adjust.trackEvent(good_user); - CommonHttpUtil.setAdvertisingChannels("val8lv", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - mFirebaseAnalytics.logEvent("FS_good_user", null); - logger.logEvent("FB_good_user", null); - } - } - }); - - //有效用户 - } else if (obj.getLongValue("see_time") >= 600) { - AdjustEvent valid_user = new AdjustEvent("xuf8ep"); - Adjust.trackEvent(valid_user); - CommonHttpUtil.setAdvertisingChannels("xuf8ep", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - mFirebaseAnalytics.logEvent("FS_Valid_user", null); - logger.logEvent("FB_Valid_user", null); - } - } - }); - } //连接socket LiveHttpUtil.enterBackRoom(mLiveBean.getUid(), mLiveBean.getStream(), new HttpCallback() { @Override diff --git a/main/src/main/java/com/yunbao/main/activity/EntryActivity.java b/main/src/main/java/com/yunbao/main/activity/EntryActivity.java index 721444d67..0940dc8b3 100644 --- a/main/src/main/java/com/yunbao/main/activity/EntryActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/EntryActivity.java @@ -2,8 +2,6 @@ package com.yunbao.main.activity; import static com.yunbao.common.CommonAppContext.home_zdy_img_cn; import static com.yunbao.common.CommonAppContext.home_zdy_img_us; -import static com.yunbao.common.CommonAppContext.logger; -import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; import android.annotation.SuppressLint; import android.app.Activity; @@ -33,8 +31,6 @@ import android.widget.VideoView; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; -import com.adjust.sdk.Adjust; -import com.adjust.sdk.AdjustEvent; import com.alibaba.android.arouter.facade.annotation.Route; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; @@ -77,9 +73,9 @@ import com.yunbao.common.HtmlConfig; import com.yunbao.common.activity.WebViewActivity; import com.yunbao.common.bean.FaceBookUpModel; import com.yunbao.common.bean.IMLoginModel; +import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.LoginData; import com.yunbao.common.bean.UserBean; -import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpClient; import com.yunbao.common.http.main.MainNetManager; @@ -92,7 +88,6 @@ import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.live.activity.LiveAudienceActivity; -import com.yunbao.common.bean.LiveBean; import com.yunbao.live.http.LiveHttpUtil; import com.yunbao.live.presenter.LiveRoomCheckLivePresenter; import com.yunbao.main.R; @@ -238,18 +233,6 @@ public class EntryActivity extends AppCompatActivity { getPromoCode(); getUuidDevice(); - AdjustEvent adjustEvent2 = new AdjustEvent("tyqsyf"); - Adjust.trackEvent(adjustEvent2); - CommonHttpUtil.setAdvertisingChannels("tyqsyf", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - mFirebaseAnalytics.logEvent("FS_registration", null); - logger.logEvent("FB_registration"); - } - } - }); - video_view = findViewById(R.id.video_view); video_view.setVideoPath(Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.login_video) + ""); video_view.start(); @@ -278,17 +261,6 @@ public class EntryActivity extends AppCompatActivity { return; } timerOutBtn(view); - AdjustEvent adjustEvent = new AdjustEvent("umk7ri"); - Adjust.trackEvent(adjustEvent); - CommonHttpUtil.setAdvertisingChannels("umk7ri", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - mFirebaseAnalytics.logEvent("FS_click_fb", null); - logger.logEvent("FB_click_fb"); - } - } - }); MainNetManager.get(EntryActivity.this) .FaceBookUp(new com.yunbao.common.http.base.HttpCallback() { @Override @@ -307,25 +279,6 @@ public class EntryActivity extends AppCompatActivity { } }); - // LoginManager.getInstance().logInWithReadPermissions(EntryActivity.this, Arrays.asList("public_profile")); -// MainNetManager.get(EntryActivity.this) -// .FaceBookUp(new com.yunbao.common.http.base.HttpCallback() { -// @Override -// public void onSuccess(FaceBookUpModel data) { -// if(data.getType().equals("1")){ -// LoginManager.getInstance().logInWithReadPermissions(EntryActivity.this, Arrays.asList("public_profile")); -// }else{ -// WebViewActivity.forward(EntryActivity.this, data.getLink()+"?"); -// } -// -// } -// -// @Override -// public void onError(String error) { -// -// -// } -// }); } }); @@ -356,17 +309,6 @@ public class EntryActivity extends AppCompatActivity { return; } timerOutBtn(v); - AdjustEvent adjustEvent = new AdjustEvent("iqd6b7"); - Adjust.trackEvent(adjustEvent); - CommonHttpUtil.setAdvertisingChannels("iqd6b7", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - mFirebaseAnalytics.logEvent("FS_click_google", null); - logger.logEvent("FB_click_google"); - } - } - }); Intent signInIntent = mGoogleSignInClient.getSignInIntent(); startActivityForResult(signInIntent, 1002); } @@ -379,17 +321,6 @@ public class EntryActivity extends AppCompatActivity { return; } timerOutBtn(v); - AdjustEvent adjustEvent = new AdjustEvent("le2qca"); - Adjust.trackEvent(adjustEvent); - CommonHttpUtil.setAdvertisingChannels("le2qca", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - mFirebaseAnalytics.logEvent("FS_click_twitter", null); - logger.logEvent("FB_click_twitter"); - } - } - }); tt_login_button.performClick(); } }); @@ -432,17 +363,6 @@ public class EntryActivity extends AppCompatActivity { } timerOutBtn(view); try { - AdjustEvent adjustEvent = new AdjustEvent("gev462"); - Adjust.trackEvent(adjustEvent); - CommonHttpUtil.setAdvertisingChannels("gev462", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - mFirebaseAnalytics.logEvent("FS_click_line", null); - logger.logEvent("FB_click_line"); - } - } - }); // App-to-app login Intent loginIntent = LineLoginApi.getLoginIntent( view.getContext(), @@ -600,17 +520,17 @@ public class EntryActivity extends AppCompatActivity { @Override protected void onCurrentProfileChanged(@Nullable Profile pf, @Nullable Profile profile1) { - if(!enableButtons){ - stopTracking(); - return; - } - if(pf!=null){ - loginFaceBookUpdateUI(pf); - }else if(profile1!=null){ - loginFaceBookUpdateUI(profile1); - }else{ - ToastUtil.show(getResources().getString(R.string.user_login_outtime)); - } + if (!enableButtons) { + stopTracking(); + return; + } + if (pf != null) { + loginFaceBookUpdateUI(pf); + } else if (profile1 != null) { + loginFaceBookUpdateUI(profile1); + } else { + ToastUtil.show(getResources().getString(R.string.user_login_outtime)); + } stopTracking(); } }; @@ -672,49 +592,13 @@ public class EntryActivity extends AppCompatActivity { */ private void loginBuyThird(LoginData data) { mLoginType = data.getType(); - if(CommonAppConfig.IS_GOOGLE_PLAY==true) { + if (CommonAppConfig.IS_GOOGLE_PLAY == true) { mPromoCode = ""; } MainHttpUtil.loginByThird(data.getOpenID(), mPromoCode, mUuidDevice, data.getNickName(), data.getAvatar(), data.getType(), new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { onLoginSuccess(code, msg, info); - if (code == 0) { - //完成第三方登录 - if (mLoginType.equals("twitter")) { - AdjustEvent adjustEvent1 = new AdjustEvent("winf6e"); - Adjust.trackEvent(adjustEvent1); - mFirebaseAnalytics.logEvent("FS_log_twitter", null); - logger.logEvent("FB_log_twitter"); - } else if (mLoginType.equals("facebook")) { - AdjustEvent adjustEvent1 = new AdjustEvent("oywoff"); - Adjust.trackEvent(adjustEvent1); - mFirebaseAnalytics.logEvent("FS_log_fb", null); - logger.logEvent("FB_log_fb"); - } else if (mLoginType.equals("google")) { - AdjustEvent adjustEvent1 = new AdjustEvent("1cm8gl"); - Adjust.trackEvent(adjustEvent1); - mFirebaseAnalytics.logEvent("FS_log_google", null); - logger.logEvent("FB_log_google"); - } else if (mLoginType.equals("line")) { - AdjustEvent adjustEvent1 = new AdjustEvent("71p74r"); - Adjust.trackEvent(adjustEvent1); - mFirebaseAnalytics.logEvent("FS_log_line", null); - logger.logEvent("FB_log_line"); - } - } - CommonHttpUtil.setAdvertisingChannels("1com4k", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - mFirebaseAnalytics.logEvent("FS_createdRole", null); - logger.logEvent("FB_createdRole"); - } - } - }); - AdjustEvent adjustEvent1 = new AdjustEvent("1com4k"); - Adjust.trackEvent(adjustEvent1); - } }); } @@ -755,65 +639,6 @@ public class EntryActivity extends AppCompatActivity { public void callback(UserBean bean) { if (mFirstLogin) { - //绑定广告渠道用户 - AdjustEvent adjustEvent = new AdjustEvent("s1or0t"); - adjustEvent.addCallbackParameter("userid", CommonAppConfig.getInstance().getUid()); - Adjust.trackEvent(adjustEvent); - - //完成第三方登录 - if (mLoginType.equals("twitter")) { - AdjustEvent adjustEvent1 = new AdjustEvent("ea6lld"); - Adjust.trackEvent(adjustEvent1); - CommonHttpUtil.setAdvertisingChannels("ea6lld", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - mFirebaseAnalytics.logEvent("FS_reg_twitter", null); - logger.logEvent("FB_reg_twitter"); - } - } - }); - - } else if (mLoginType.equals("facebook")) { - AdjustEvent adjustEvent1 = new AdjustEvent("5jbk95"); - Adjust.trackEvent(adjustEvent1); - CommonHttpUtil.setAdvertisingChannels("5jbk95", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - mFirebaseAnalytics.logEvent("FS_reg_fb", null); - logger.logEvent("FB_reg_fb"); - } - } - }); - - } else if (mLoginType.equals("google")) { - AdjustEvent adjustEvent1 = new AdjustEvent("krap47"); - Adjust.trackEvent(adjustEvent1); - CommonHttpUtil.setAdvertisingChannels("krap47", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - mFirebaseAnalytics.logEvent("FS_reg_google", null); - logger.logEvent("FB_reg_google"); - } - } - }); - - } else if (mLoginType.equals("line")) { - AdjustEvent adjustEvent1 = new AdjustEvent("uaacbn"); - Adjust.trackEvent(adjustEvent1); - - CommonHttpUtil.setAdvertisingChannels("uaacbn", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - mFirebaseAnalytics.logEvent("FS_reg_line", null); - logger.logEvent("FB_reg_line"); - } - } - }); - } if (CommonAppConfig.IS_GOOGLE_PLAY == true) { EntryActivity.this.startActivity(new Intent(EntryActivity.this, OneLoginActivity.class)); } else { @@ -879,7 +704,7 @@ public class EntryActivity extends AppCompatActivity { } private void timerOutBtn(View btn) { - if(mBtnClick){ + if (mBtnClick) { return; } loginLoadingDialog = DialogUitl.loadingDialog(EntryActivity.this, WordUtil.getString(R.string.login_wait)); @@ -888,9 +713,9 @@ public class EntryActivity extends AppCompatActivity { @Override public void run() { mBtnClick = false; - if(loginLoadingDialog!=null){ + if (loginLoadingDialog != null) { loginLoadingDialog.dismiss(); - loginLoadingDialog=null; + loginLoadingDialog = null; } } }, 3000); @@ -907,11 +732,11 @@ public class EntryActivity extends AppCompatActivity { @Override protected void onDestroy() { super.onDestroy(); - if(loginLoadingDialog!=null){ - if(loginLoadingDialog.isShowing()){ + if (loginLoadingDialog != null) { + if (loginLoadingDialog.isShowing()) { loginLoadingDialog.dismiss(); } - loginLoadingDialog=null; + loginLoadingDialog = null; } } } diff --git a/main/src/main/java/com/yunbao/main/activity/GoogleFragment.java b/main/src/main/java/com/yunbao/main/activity/GoogleFragment.java index a987649b1..3cba5f540 100644 --- a/main/src/main/java/com/yunbao/main/activity/GoogleFragment.java +++ b/main/src/main/java/com/yunbao/main/activity/GoogleFragment.java @@ -1,12 +1,9 @@ package com.yunbao.main.activity; -import static com.yunbao.common.CommonAppContext.logger; -import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; import static com.yunbao.main.activity.MyWalletActivity.dis; import android.annotation.SuppressLint; -import android.app.ProgressDialog; import android.os.Bundle; import android.os.Handler; import android.util.Log; @@ -18,9 +15,6 @@ import android.webkit.WebSettings; import android.webkit.WebView; import androidx.fragment.app.Fragment; - -import com.adjust.sdk.Adjust; -import com.adjust.sdk.AdjustEvent; import com.android.billingclient.api.Purchase; import com.facebook.appevents.AppEventsConstants; import com.google.android.gms.ads.identifier.AdvertisingIdClient; @@ -111,8 +105,8 @@ public class GoogleFragment extends Fragment { } - private Handler payHandler = new Handler(); + //js调用原生 public class JsInteration { @@ -140,18 +134,9 @@ public class GoogleFragment extends Fragment { Bundle params = new Bundle(); params.putString("currency", "HKD"); params.putString("money", MoneyUsds); - logger.logEvent("FB_iap_Play", params); - - Bundle fb_params = new Bundle(); fb_params.putString(AppEventsConstants.EVENT_PARAM_CURRENCY, "HKD"); fb_params.putString(AppEventsConstants.EVENT_PARAM_CONTENT_ID, mProductId); - - //fb官方事件记录充值 - logger.logEvent(AppEventsConstants.EVENT_NAME_PURCHASED, - Double.parseDouble(MoneyUsds), - fb_params); - //Google官方充值通知 Bundle google_params = new Bundle(); google_params.putString("currency", "HKD"); @@ -160,31 +145,6 @@ public class GoogleFragment extends Fragment { google_params.putString("value", MoneyUsds); google_params.putString("price", MoneyUsds); google_params.putString("quantity", "1"); - - mFirebaseAnalytics.logEvent("FS_iap_Play", google_params); - - - AdjustEvent adjustEvent1 = new AdjustEvent("cgssol"); - Adjust.trackEvent(adjustEvent1); - CommonHttpUtil.setAdvertisingChannels("cgssol", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - logger.logEvent("FB_iap_users", null); - mFirebaseAnalytics.logEvent("FS_iap_users", null); - } - } - }); - - AdjustEvent adjustEvent2 = new AdjustEvent("tr8lb9"); - adjustEvent2.setRevenue(Double.parseDouble(MoneyUsds),"HKD"); - adjustEvent2.addCallbackParameter("GOrderid",purchase.getOrderId()); - adjustEvent2.addCallbackParameter("POrderid",mOrderid); - adjustEvent2.addCallbackParameter("Uid", CommonAppConfig.getInstance().getUid()); - adjustEvent2.addCallbackParameter("GADid",adid); - adjustEvent2.setOrderId(mOrderid); - Adjust.trackEvent(adjustEvent2); - dis(); ToastUtil.show("支付成功"); } @@ -201,15 +161,7 @@ public class GoogleFragment extends Fragment { public void onPayFailed(int code, String msg) { } - }).checkSku(ProductId) - ; - //下单 - Bundle params = new Bundle(); - params.putString(AppEventsConstants.EVENT_PARAM_CONTENT_ID, mProductId); - params.putString(AppEventsConstants.EVENT_PARAM_CURRENCY, "HKD"); - logger.logEvent(AppEventsConstants.EVENT_NAME_INITIATED_CHECKOUT, Double.parseDouble(MoneyUsds), - params); - + }).checkSku(ProductId); } @JavascriptInterface diff --git a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java index efc7bd235..fd0a94823 100644 --- a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java @@ -1,12 +1,12 @@ package com.yunbao.main.activity; +import static com.yunbao.common.CommonAppContext.home_zdy_img_cn; +import static com.yunbao.common.CommonAppContext.home_zdy_img_us; + import android.animation.ObjectAnimator; import android.app.Activity; import android.content.Context; import android.content.Intent; - -import androidx.recyclerview.widget.RecyclerView; - import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; @@ -16,8 +16,8 @@ import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import android.widget.Toast; -import com.adjust.sdk.Adjust; -import com.adjust.sdk.AdjustEvent; +import androidx.recyclerview.widget.RecyclerView; + import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.blankj.utilcode.util.DeviceUtils; @@ -34,6 +34,7 @@ import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.activity.WebViewActivity; import com.yunbao.common.bean.ConfigBean; import com.yunbao.common.bean.IMLoginModel; +import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.LoginData; import com.yunbao.common.bean.UserBean; import com.yunbao.common.http.CommonHttpConsts; @@ -48,7 +49,6 @@ import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.live.activity.LiveAudienceActivity; -import com.yunbao.common.bean.LiveBean; import com.yunbao.live.http.LiveHttpUtil; import com.yunbao.live.presenter.LiveRoomCheckLivePresenter; import com.yunbao.main.R; @@ -60,11 +60,6 @@ import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; -import static com.yunbao.common.CommonAppContext.home_zdy_img_cn; -import static com.yunbao.common.CommonAppContext.home_zdy_img_us; -import static com.yunbao.common.CommonAppContext.logger; -import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; - /** * Created by cxf on 2018/9/17. @@ -108,12 +103,6 @@ public class LoginActivity extends AbsActivity { mRoot = findViewById(R.id.root); Contexts = this; activity = this; - //进入登录页面 - AdjustEvent adjustEvent1 = new AdjustEvent("2gar15"); - Adjust.trackEvent(adjustEvent1); - mFirebaseAnalytics.logEvent("FS_loginpage", null); - logger.logEvent("FB_loginpage"); - OpenInstall.getInstall(new AppInstallAdapter() { @Override public void onInstall(AppData appData) { @@ -180,16 +169,7 @@ public class LoginActivity extends AbsActivity { login(); } else if (i == R.id.btn_register) { - //去手机注册 - AdjustEvent adjustEvent1 = new AdjustEvent("orgi58"); - Adjust.trackEvent(adjustEvent1); - - - mFirebaseAnalytics.logEvent("FS_phone_click", null); - logger.logEvent("FB_phone_click"); - register(); - } else if (i == R.id.btn_forget_pwd) { forgetPwd(); @@ -291,11 +271,7 @@ public class LoginActivity extends AbsActivity { //设置登录信息 IMLoginModel model = GsonUtils.fromJson(info[0], IMLoginModel.class); IMLoginManager.get(activity).setupLoginUser(model); - getBaseUserInfo(); - mFirebaseAnalytics.logEvent("FS_createdRole", null); - logger.logEvent("FB_createdRole"); - } else { ToastUtil.show(msg); } @@ -310,11 +286,6 @@ public class LoginActivity extends AbsActivity { public void callback(UserBean bean) { //融云连接服务器 RongcloudIMManager.connectIM(activity); - //完成手机号密码登录 - AdjustEvent adjustEvent1 = new AdjustEvent("4ncwlv"); - mFirebaseAnalytics.logEvent("FS_login", null); - logger.logEvent("FB_login"); - Adjust.trackEvent(adjustEvent1); HttpClient.getInstance().post("Home.getRandJoinAnchor", "Home.getRandJoinAnchor") .execute(new HttpCallback() { @Override @@ -343,7 +314,7 @@ public class LoginActivity extends AbsActivity { public void onError(Response response) { super.onError(response); String message = response.message(); - System.out.println(">>>>>"+message); + System.out.println(">>>>>" + message); } }); diff --git a/main/src/main/java/com/yunbao/main/activity/MyWalletActivity.java b/main/src/main/java/com/yunbao/main/activity/MyWalletActivity.java index 4253f67ba..63ddb86b9 100644 --- a/main/src/main/java/com/yunbao/main/activity/MyWalletActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MyWalletActivity.java @@ -1,7 +1,5 @@ package com.yunbao.main.activity; -import static com.yunbao.common.CommonAppContext.logger; -import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; import android.content.Context; import android.graphics.Color; @@ -16,9 +14,6 @@ import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentPagerAdapter; import androidx.viewpager.widget.ViewPager; - -import com.adjust.sdk.Adjust; -import com.adjust.sdk.AdjustEvent; import com.alibaba.android.arouter.facade.annotation.Route; import com.android.billingclient.api.BillingResult; import com.android.billingclient.api.Purchase; @@ -65,10 +60,6 @@ public class MyWalletActivity extends AbsActivity { super.main(); mw = MyWalletActivity.this; setTitle(WordUtil.getString(R.string.wallet)); - AdjustEvent adjustEvent1 = new AdjustEvent("eap1ec"); - Adjust.trackEvent(adjustEvent1); - mFirebaseAnalytics.logEvent("FS_initiated_checkout", null); - logger.logEvent("FB_initiated_checkout"); GoogleBillingUtilNew.getInstance().initGooglePay(mContext); vp_content = (ViewPager) findViewById(R.id.vp_content); TextView rView = (TextView) findViewById(R.id.rView); diff --git a/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java b/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java index 630d9812c..3a1a048fa 100644 --- a/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java @@ -1,8 +1,5 @@ package com.yunbao.main.activity; -import static com.yunbao.common.CommonAppContext.logger; -import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; - import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; @@ -26,9 +23,6 @@ import android.widget.LinearLayout; import android.widget.ProgressBar; import androidx.annotation.RequiresApi; - -import com.adjust.sdk.Adjust; -import com.adjust.sdk.AdjustEvent; import com.alibaba.android.arouter.facade.annotation.Route; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; @@ -555,12 +549,6 @@ public class MyWebViewActivity extends AbsActivity { } else if (TextUtils.equals(event.getMethod(), "androidMethodLookToLive")) { //看直播 gotoLive(event.getLiveId()); - } else if (TextUtils.equals(event.getMethod(), "AndroidFellow")) { - mFirebaseAnalytics.logEvent("FS_Follow", null); - logger.logEvent("FB_Follow", null); - AdjustEvent adjustEvent1 = new AdjustEvent("oess6a"); - Adjust.trackEvent(adjustEvent1); - } else if (TextUtils.equals(event.getMethod(), "androidClickSayHiBack")) { Constants.firstInto = 0; EventBus.getDefault().post(new MainHomeCommunityToChatEvent().setTargetId(event.getUserId())); diff --git a/main/src/main/java/com/yunbao/main/activity/OneLoginActivity.java b/main/src/main/java/com/yunbao/main/activity/OneLoginActivity.java index 3d854344d..84bf8ff6f 100644 --- a/main/src/main/java/com/yunbao/main/activity/OneLoginActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/OneLoginActivity.java @@ -1,13 +1,9 @@ package com.yunbao.main.activity; -import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; - -import com.adjust.sdk.Adjust; -import com.adjust.sdk.AdjustEvent; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.makeramen.roundedimageview.RoundedImageView; @@ -18,7 +14,6 @@ import com.yunbao.common.CommonAppConfig; import com.yunbao.common.activity.AbsActivity; 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.interfaces.ImageResultCallback; import com.yunbao.common.utils.DialogUitl; @@ -30,13 +25,10 @@ import com.yunbao.main.http.MainHttpUtil; import java.io.File; -import static com.yunbao.common.CommonAppContext.logger; -import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; - public class OneLoginActivity extends AbsActivity { RoundedImageView avatar; - EditText edit_user,edit_code; + EditText edit_user, edit_code; Button btn_enter; public static OneLoginActivity act; @@ -45,6 +37,7 @@ public class OneLoginActivity extends AbsActivity { protected int getLayoutId() { return R.layout.activity_one_login; } + private ProcessImageUtil mImageUtil; private void updataImg() { @@ -66,10 +59,10 @@ public class OneLoginActivity extends AbsActivity { protected void main() { super.main(); act = this; - avatar = (RoundedImageView)findViewById(R.id.avatar); - edit_user = (EditText)findViewById(R.id.edit_user); - edit_code = (EditText)findViewById(R.id.edit_code); - btn_enter = (Button)findViewById(R.id.btn_enter); + avatar = (RoundedImageView) findViewById(R.id.avatar); + edit_user = (EditText) findViewById(R.id.edit_user); + edit_code = (EditText) findViewById(R.id.edit_code); + btn_enter = (Button) findViewById(R.id.btn_enter); mImageUtil = new ProcessImageUtil(this); mImageUtil.setImageResultCallback(new ImageResultCallback() { @Override @@ -90,7 +83,7 @@ public class OneLoginActivity extends AbsActivity { JSONObject obj = JSON.parseObject(info[0]); bean.setAvatar(obj.getString("avatar")); bean.setAvatarThumb(obj.getString("avatarThumb")); - ImgLoader.displayAvatar(mContext,CommonAppConfig.getInstance().getUserBean().getAvatar(), avatar); + ImgLoader.displayAvatar(mContext, CommonAppConfig.getInstance().getUserBean().getAvatar(), avatar); V2TIMUserFullInfo v2TIMUserFullInfo = new V2TIMUserFullInfo(); v2TIMUserFullInfo.setFaceUrl(obj.getString("avatarThumb")); V2TIMManager.getInstance().setSelfInfo(v2TIMUserFullInfo, new V2TIMCallback() { @@ -113,7 +106,7 @@ public class OneLoginActivity extends AbsActivity { public void onFailure() { } }); - ImgLoader.displayAvatar(mContext,CommonAppConfig.getInstance().getUserBean().getAvatar(), avatar); + ImgLoader.displayAvatar(mContext, CommonAppConfig.getInstance().getUserBean().getAvatar(), avatar); edit_user.setText(CommonAppConfig.getInstance().getUserBean().getUserNiceName()); @@ -128,21 +121,10 @@ public class OneLoginActivity extends AbsActivity { btn_enter.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - AdjustEvent adjustEvent = new AdjustEvent("xgt0h2"); - Adjust.trackEvent(adjustEvent); - CommonHttpUtil.setAdvertisingChannels("xgt0h2", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if(code == 0) { - mFirebaseAnalytics.logEvent("FS_binding_click", null); - logger.logEvent("FB_binding_click"); - } - } - }); OneLoginDialog fragment = new OneLoginDialog(); Bundle bundle = new Bundle(); - bundle.putString("name", edit_user.getText().toString()+""); - bundle.putString("code", edit_code.getText().toString()+""); + bundle.putString("name", edit_user.getText().toString() + ""); + bundle.putString("code", edit_code.getText().toString() + ""); fragment.setArguments(bundle); fragment.show(getSupportFragmentManager(), "OneLoginDialog"); } 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 80efdcf6e..e41463cbb 100644 --- a/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java @@ -21,8 +21,6 @@ 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.binioter.guideview.Guide; import com.binioter.guideview.GuideBuilder; @@ -325,8 +323,6 @@ public class PDLiveConversationListActivity extends AbsActivity implements View. netHandler.post(systemNumberRunnable); FirebaseAnalytics.getInstance(mContext).logEvent("FS_customer_service", null); AppEventsLogger.newLogger(mContext).logEvent("FB_customer_service"); - AdjustEvent adjustEvent1 = new AdjustEvent("ww5z2p"); - Adjust.trackEvent(adjustEvent1); if (userBean.getLink() != null && !"".equals(userBean.getLink())) { WebViewActivity.forward(mContext, userBean.getLink()); } else { diff --git a/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java b/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java index 2530af985..d338a1b8d 100644 --- a/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java @@ -1,8 +1,10 @@ package com.yunbao.main.activity; +import static com.yunbao.common.CommonAppContext.home_zdy_img_cn; +import static com.yunbao.common.CommonAppContext.home_zdy_img_us; + import android.app.Dialog; import android.content.Intent; -import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.text.Editable; @@ -18,14 +20,10 @@ import android.widget.EditText; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; - -import com.adjust.sdk.Adjust; -import com.adjust.sdk.AdjustEvent; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.blankj.utilcode.util.DeviceUtils; import com.blankj.utilcode.util.GsonUtils; -import com.facebook.appevents.AppEventsConstants; import com.fm.openinstall.OpenInstall; import com.fm.openinstall.listener.AppInstallAdapter; import com.fm.openinstall.model.AppData; @@ -38,8 +36,8 @@ import com.yunbao.common.HtmlConfig; import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.activity.WebViewActivity; import com.yunbao.common.bean.IMLoginModel; +import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.UserBean; -import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpClient; import com.yunbao.common.interfaces.CommonCallback; @@ -50,7 +48,6 @@ import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.live.activity.LiveAudienceActivity; -import com.yunbao.common.bean.LiveBean; import com.yunbao.live.http.LiveHttpUtil; import com.yunbao.live.presenter.LiveRoomCheckLivePresenter; import com.yunbao.main.R; @@ -65,11 +62,6 @@ import org.greenrobot.eventbus.ThreadMode; import java.util.ArrayList; import java.util.Locale; -import static com.yunbao.common.CommonAppContext.home_zdy_img_cn; -import static com.yunbao.common.CommonAppContext.home_zdy_img_us; -import static com.yunbao.common.CommonAppContext.logger; -import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; - /** * Created by cxf on 2018/9/25. */ @@ -114,23 +106,6 @@ public class RegisterActivity extends AbsActivity { @Override protected void main() { activity = this; - //谷歌 - mFirebaseAnalytics.logEvent("FS_complete_2nd_loading", null); - logger.logEvent("FB_complete_2nd_loading"); - - - AdjustEvent adjustEvent = new AdjustEvent("pooqmz"); - Adjust.trackEvent(adjustEvent); - CommonHttpUtil.setAdvertisingChannels("pooqmz", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - //谷歌 - mFirebaseAnalytics.logEvent("FS_complete_2nd_loading", null); - logger.logEvent("FB_complete_2nd_loading"); - } - } - }); mEditPhone = (EditText) findViewById(R.id.edit_phone); webview = (WebView) findViewById(R.id.webview); initView(); @@ -158,11 +133,6 @@ public class RegisterActivity extends AbsActivity { public void onTextChanged(CharSequence s, int start, int before, int count) { if (!TextUtils.isEmpty(s) && s.length() >= mPhoneMinLength) { mBtnCode.setEnabled(true); - //输入手机号 - AdjustEvent adjustEvent1 = new AdjustEvent("4mg5a9"); - Adjust.trackEvent(adjustEvent1); - mFirebaseAnalytics.logEvent("FS_phone_num", null); - logger.logEvent("FB_phone_num"); } else { mBtnCode.setEnabled(false); } @@ -301,17 +271,8 @@ public class RegisterActivity extends AbsActivity { webview.setVisibility(View.VISIBLE); //获取设备唯一标识符 getUuidDevice(); - //获取验证码 - AdjustEvent adjustEvent1 = new AdjustEvent("rrcbdh"); - Adjust.trackEvent(adjustEvent1); - mFirebaseAnalytics.logEvent("FS_phone_getcode", null); - logger.logEvent("FB_phone_getcode"); } else if (i == R.id.btn_register) { register(); - AdjustEvent adjustEvent1 = new AdjustEvent("wrajax"); - Adjust.trackEvent(adjustEvent1); - mFirebaseAnalytics.logEvent("FS_phone_clickregister", null); - logger.logEvent("FB_phone_clickregister"); } else if (i == R.id.btn_tip2) { WebViewActivity.forward(mContext, HtmlConfig.REG_PRIVCAY1); } else if (i == R.id.btn_tip3) { @@ -400,23 +361,6 @@ public class RegisterActivity extends AbsActivity { public void onSuccess(int code, String msg, String[] info) { if (code == 0) { //注册成功 - AdjustEvent adjustEvent1 = new AdjustEvent("fhqx62"); - Adjust.trackEvent(adjustEvent1); - Bundle params = new Bundle(); - - CommonHttpUtil.setAdvertisingChannels("fhqx62", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - mFirebaseAnalytics.logEvent("FS_reg_phone", null); - logger.logEvent("FB_reg_phone"); - } - } - }); - - Bundle params1 = new Bundle(); - params1.putString(AppEventsConstants.EVENT_PARAM_REGISTRATION_METHOD, "Phone number"); - logger.logEvent(AppEventsConstants.EVENT_NAME_COMPLETED_REGISTRATION, params1); login(phoneNum, pwd, mUuidDevice); OpenInstall.reportRegister(); } else { @@ -475,12 +419,6 @@ public class RegisterActivity extends AbsActivity { //融云连接服务器 RongcloudIMManager.connectIM(activity); getBaseUserInfo(); - //绑定广告渠道用户 - AdjustEvent adjustEvent = new AdjustEvent("s1or0t"); - adjustEvent.addCallbackParameter("userid", CommonAppConfig.getInstance().getUid()); - Adjust.trackEvent(adjustEvent); - - } else { ToastUtil.show(msg); } @@ -512,6 +450,7 @@ public class RegisterActivity extends AbsActivity { } }); } + /** * 用户自动签到 */ @@ -529,7 +468,7 @@ public class RegisterActivity extends AbsActivity { JSONObject obj = JSON.parseObject(info[0]); IMLoginManager.get(activity).setisNewUserOne(true); IMLoginManager.get(activity).setNewUserGif(true); - if(obj.containsKey("home_zdy_img_us")) { + if (obj.containsKey("home_zdy_img_us")) { home_zdy_img_us = obj.getString("home_zdy_img_us"); home_zdy_img_cn = obj.getString("home_zdy_img_cn"); } diff --git a/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java b/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java index 00a9b4629..8cebe26f2 100644 --- a/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java @@ -1,7 +1,5 @@ package com.yunbao.main.activity; -import static com.yunbao.common.CommonAppContext.logger; -import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; import android.content.ClipData; import android.content.ClipboardManager; @@ -23,12 +21,8 @@ import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.LinearLayout; import android.widget.ProgressBar; -import android.widget.RelativeLayout; import androidx.annotation.RequiresApi; - -import com.adjust.sdk.Adjust; -import com.adjust.sdk.AdjustEvent; import com.alibaba.android.arouter.facade.annotation.Route; import com.opensource.svgaplayer.SVGACallback; import com.opensource.svgaplayer.SVGADrawable; @@ -363,11 +357,6 @@ public class ZhuangBanActivity extends AbsActivity { } catch (MalformedURLException e) { e.printStackTrace(); } - } else if (TextUtils.equals(event.getMethod(), "AndroidAdjustConsume")) { - mFirebaseAnalytics.logEvent("FS_event_interaction", null); - logger.logEvent("FB_event_interaction", null); - AdjustEvent adjustEvent1 = new AdjustEvent("rq2c5n"); - Adjust.trackEvent(adjustEvent1); } } 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 aef0a9a83..d4b5a6b0b 100644 --- a/main/src/main/java/com/yunbao/main/adapter/SystemMessageAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/SystemMessageAdapter.java @@ -11,9 +11,6 @@ import android.view.ViewGroup; import androidx.annotation.NonNull; 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; @@ -91,8 +88,6 @@ public class SystemMessageAdapter extends RecyclerView.Adapter { 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); } if (!TextUtils.isEmpty(model1.getLink())) { mContext.startActivity(new Intent(mContext, WebViewActivity.class).putExtra("url", model1.getLink())); diff --git a/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java b/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java index e1b2691fc..cae570931 100644 --- a/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java +++ b/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java @@ -1,5 +1,8 @@ package com.yunbao.main.dialog; +import static com.yunbao.common.CommonAppContext.home_zdy_img_cn; +import static com.yunbao.common.CommonAppContext.home_zdy_img_us; + import android.os.Bundle; import android.view.Gravity; import android.view.View; @@ -9,16 +12,13 @@ import android.widget.Button; import android.widget.TextView; import androidx.annotation.Nullable; - -import com.adjust.sdk.Adjust; -import com.adjust.sdk.AdjustEvent; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.makeramen.roundedimageview.RoundedImageView; import com.yunbao.common.CommonAppConfig; +import com.yunbao.common.bean.LiveBean; import com.yunbao.common.dialog.AbsDialogFragment; 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; @@ -27,17 +27,11 @@ import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.live.activity.LiveAudienceActivity; -import com.yunbao.common.bean.LiveBean; import com.yunbao.live.http.LiveHttpUtil; import com.yunbao.live.presenter.LiveRoomCheckLivePresenter; import com.yunbao.main.R; import com.yunbao.main.activity.MainActivity; -import static com.yunbao.common.CommonAppContext.home_zdy_img_cn; -import static com.yunbao.common.CommonAppContext.home_zdy_img_us; -import static com.yunbao.common.CommonAppContext.logger; -import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; - public class OneLoginDialog extends AbsDialogFragment { @@ -102,17 +96,6 @@ public class OneLoginDialog extends AbsDialogFragment { @Override public void onSuccess(int code, String msg, String[] info) { if (code == 0) { - AdjustEvent adjustEvent = new AdjustEvent("neb317"); - Adjust.trackEvent(adjustEvent); - CommonHttpUtil.setAdvertisingChannels("neb317", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - mFirebaseAnalytics.logEvent("FS_binding_success", null); - logger.logEvent("FB_binding_success"); - } - } - }); HttpClient.getInstance().post("Home.getRandJoinAnchor", "Home.getRandJoinAnchor") .execute(new HttpCallback() { @Override diff --git a/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java index 091d25bcc..fa972ccab 100644 --- a/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java @@ -15,9 +15,6 @@ import android.widget.TextView; import androidx.fragment.app.FragmentActivity; 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.binioter.guideview.Guide; import com.binioter.guideview.GuideBuilder; @@ -277,8 +274,6 @@ public class MainMessageViewHolder extends AbsMainViewHolder { netHandler.post(systemNumberRunnable); FirebaseAnalytics.getInstance(mContext).logEvent("FS_customer_service", null); AppEventsLogger.newLogger(mContext).logEvent("FB_customer_service"); - AdjustEvent adjustEvent1 = new AdjustEvent("ww5z2p"); - Adjust.trackEvent(adjustEvent1); if (userBean.getLink() != null && !"".equals(userBean.getLink())) { WebViewActivity.forward(mContext, userBean.getLink()); } else {