feat:移除bugly
This commit is contained in:
@@ -393,10 +393,6 @@
|
||||
android:scheme="yinmengpushscheme" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.tencent.bugly.beta.ui.BetaActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize|locale"
|
||||
android:theme="@android:style/Theme.Translucent" />
|
||||
<activity
|
||||
android:name="com.nnbc123.core.pay.PaymentActivity"
|
||||
android:launchMode="singleTask"
|
||||
|
@@ -118,7 +118,7 @@ import com.nnbc123.library.threadmgr.ThreadPoolManager;
|
||||
import com.nnbc123.library.utils.JavaUtil;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.orhanobut.logger.Logger;
|
||||
import com.tencent.bugly.crashreport.CrashReport;
|
||||
import com.nnbc123.core.statistic.StatisticManager;
|
||||
import com.tongdaxing.erban.upgrade.AppUpgradeHelper;
|
||||
import com.trello.rxlifecycle3.android.ActivityEvent;
|
||||
|
||||
@@ -480,8 +480,6 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
|
||||
@SuppressLint("CheckResult")
|
||||
public void onLogin(long uid) {
|
||||
Logger.e(TAG, "onLogin Success ~~~~");
|
||||
CrashReport.setUserId(this, uid + "");
|
||||
|
||||
Log.i("checkLostUser", "onLogin");
|
||||
|
||||
//登录成功查询未读信息数量
|
||||
|
@@ -20,7 +20,6 @@ import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.net.http.HttpResponseCache;
|
||||
import android.os.Build;
|
||||
import android.os.Environment;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
@@ -63,18 +62,14 @@ import com.orhanobut.logger.Logger;
|
||||
import com.scwang.smartrefresh.header.MaterialHeader;
|
||||
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.footer.ClassicsFooter;
|
||||
import com.tencent.bugly.Bugly;
|
||||
import com.tencent.bugly.beta.Beta;
|
||||
import com.tencent.bugly.crashreport.CrashReport;
|
||||
import com.nnbc123.core.statistic.StatisticManager;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.umeng.commonsdk.UMConfigure;
|
||||
import com.nnbc123.app.BuildConfig;
|
||||
import com.nnbc123.app.MainActivity;
|
||||
import com.nnbc123.app.NimMiddleActivity;
|
||||
import com.nnbc123.app.R;
|
||||
import com.nnbc123.app.module_hall.HallDataManager;
|
||||
import com.nnbc123.app.other.activity.SplashActivity;
|
||||
import com.nnbc123.app.quick_pass.QuickPassLoginAct;
|
||||
import com.nnbc123.app.radish.wallet.RadishWalletManager;
|
||||
import com.nnbc123.app.utils.PushMessageHandler;
|
||||
import com.nnbc123.xchat_android_constants.XChatConstants;
|
||||
@@ -282,12 +277,6 @@ public class XChatApplication extends BaseApp {
|
||||
init(channel);
|
||||
initStetho(context);
|
||||
|
||||
if (!TextUtils.isEmpty(channel)) {
|
||||
CrashReport.setAppChannel(context, channel);
|
||||
}
|
||||
initBuglyUpdate();
|
||||
Bugly.init(context, BuildConfig.DEBUG ? XChatConstants.BUGLY_KEY_DEBUG : XChatConstants.BUGLY_KEY_RELEASE, BuildConfig.DEBUG);
|
||||
|
||||
//生命周期监听
|
||||
if (lifeManager == null) {
|
||||
lifeManager = new ActivityLifeManager();
|
||||
@@ -455,58 +444,6 @@ public class XChatApplication extends BaseApp {
|
||||
return packageName.equals(processName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化bugly版本升级
|
||||
*/
|
||||
private static void initBuglyUpdate() {
|
||||
/***** Beta高级设置 *****/
|
||||
/**
|
||||
* true表示app启动自动初始化升级模块;
|
||||
* false不会自动初始化;
|
||||
* 开发者如果担心sdk初始化影响app启动速度,可以设置为false,
|
||||
* 在后面某个时刻手动调用Beta.init(getApplicationContext(),false);
|
||||
*/
|
||||
// Beta.autoInit = true;
|
||||
/**
|
||||
* true表示初始化时自动检查升级;
|
||||
* false表示不会自动检查升级,需要手动调用Beta.checkUpgrade()方法;
|
||||
*/
|
||||
// Beta.autoCheckUpgrade = true;
|
||||
/**
|
||||
* 设置升级检查周期为60s(默认检查周期为0s),60s内SDK不重复向后台请求策略);
|
||||
*/
|
||||
// Beta.upgradeCheckPeriod = 60 * 1000;
|
||||
|
||||
/**
|
||||
* 设置启动延时为1s(默认延时3s),APP启动1s后初始化SDK,避免影响APP启动速度;
|
||||
*/
|
||||
Beta.initDelay = 6 * 1000;
|
||||
|
||||
/**
|
||||
* 设置sd卡的Download为更新资源保存目录;
|
||||
* 后续更新资源会保存在此目录,需要在manifest中添加WRITE_EXTERNAL_STORAGE权限;
|
||||
*/
|
||||
// Beta.storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
|
||||
|
||||
/**
|
||||
* 点击过确认的弹窗在APP下次启动自动检查更新时会再次显示;
|
||||
*/
|
||||
Beta.showInterruptedStrategy = true;
|
||||
|
||||
/**
|
||||
* 只允许在MainActivity上显示更新弹窗,其他activity上不显示弹窗;
|
||||
* 不设置会默认所有activity都可以显示弹窗;
|
||||
* 2021/6/22 增加登录页面也可以弹出,万一域名挂了还可以用bugly更新!!
|
||||
*/
|
||||
Beta.canShowUpgradeActs.add(MainActivity.class);
|
||||
Beta.canShowUpgradeActs.add(QuickPassLoginAct.class);
|
||||
/**
|
||||
* 自定义布局
|
||||
*/
|
||||
Beta.upgradeDialogLayoutId = R.layout.upgrade_dialog;//关键代码写这个布局添加自己想要的
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化RxNet
|
||||
*
|
||||
@@ -669,7 +606,6 @@ public class XChatApplication extends BaseApp {
|
||||
@Override
|
||||
public void onTerminate() {
|
||||
super.onTerminate();
|
||||
CrashReport.closeBugly();
|
||||
if (lifeManager != null) {
|
||||
unregisterActivityLifecycleCallbacks(lifeManager);
|
||||
}
|
||||
|
@@ -127,7 +127,7 @@ import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.opensource.svgaplayer.SVGAParser;
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||
import com.orhanobut.logger.Logger;
|
||||
import com.tencent.bugly.crashreport.CrashReport;
|
||||
import com.nnbc123.core.statistic.StatisticManager;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
@@ -915,7 +915,7 @@ public class AVRoomActivity extends BaseMvpActivity<IAvRoomView, AvRoomPresenter
|
||||
}
|
||||
dismissLoadingDialog();
|
||||
} catch (Exception e) {
|
||||
CrashReport.postCatchedException(e);
|
||||
StatisticManager.Instance().logException(e);
|
||||
}
|
||||
EventBus.getDefault().unregister(this);
|
||||
super.onDestroy();
|
||||
|
@@ -1,152 +0,0 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/transparent_ban"
|
||||
android:clipChildren="false"
|
||||
android:gravity="center">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/dialog_background"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<!-- 通过id设置的控件 -->
|
||||
<!--<ImageView-->
|
||||
<!--android:id="@+id/imageview"-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:src="@mipmap/ic_launcher" />-->
|
||||
|
||||
<!--<!–通过tag设置的控件 –>-->
|
||||
<!--<TextView-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:tag="textview"-->
|
||||
<!--android:text="customText" />-->
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="-50dp"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:tag="beta_upgrade_banner"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/update_banner"/>
|
||||
|
||||
|
||||
<!-- 【必设】升级标题控件tag:beta_title-->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="42dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="10dp"
|
||||
android:tag="beta_title"
|
||||
android:text="title"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="#273238"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="发现新版本"
|
||||
android:textColor="#ff795eef"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="70dp"
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="24.5dp"
|
||||
android:paddingEnd="24.5dp"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingBottom="@dimen/dp_6"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="4dp">
|
||||
<!-- 【必设】升级信息控件tag:beta_upgrade_info-->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:tag="beta_upgrade_info"
|
||||
android:text="info"
|
||||
android:textColor="#757575"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:text="@string/strUpgradeDialogFeatureLabel"
|
||||
android:textColor="#273238"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"/>
|
||||
<!-- 【必设】更新属性控件tag:beta_upgrade_feature-->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:tag="beta_upgrade_feature"
|
||||
android:text="feature"
|
||||
android:lineSpacingExtra="5dp"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="15dp">
|
||||
<!-- 【必设】取消按钮tag:beta_cancel_button-->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_common_cancel"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:tag="beta_cancel_button"
|
||||
android:text="下次再说"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:textColor="@color/color_7154EE"
|
||||
android:textSize="@dimen/dp_14"/>
|
||||
<!-- 【必设】确认按钮tag:beta_confirm_button-->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_common_confirm_normal"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:tag="beta_confirm_button"
|
||||
android:text="立刻升级"
|
||||
android:layout_marginStart="10dp"
|
||||
android:textColor="@color/text_normal_282828"
|
||||
android:textSize="@dimen/dp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
@@ -90,9 +90,6 @@ dependencies {
|
||||
// RxJava support for Room
|
||||
api 'androidx.room:room-rxjava2:2.3.0'
|
||||
|
||||
api 'com.tencent.bugly:crashreport_upgrade:1.6.1'
|
||||
api 'com.tencent.bugly:nativecrashreport:3.9.2'
|
||||
|
||||
api project(':nim_uikit')
|
||||
api project(':library')
|
||||
// api project(':trtc_release')
|
||||
|
@@ -3,8 +3,8 @@ package com.nnbc123.core.manager.trtc;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Message;
|
||||
|
||||
import com.nnbc123.core.statistic.StatisticManager;
|
||||
import com.orhanobut.logger.Logger;
|
||||
import com.tencent.bugly.crashreport.CrashReport;
|
||||
import com.tencent.trtc.TRTCCloudDef;
|
||||
import com.nnbc123.core.im.custom.bean.RoomPkBean;
|
||||
import com.nnbc123.core.manager.AudioEngineManager;
|
||||
@@ -33,7 +33,7 @@ public class TRtcEngineEventHandler implements IRTCEngineHandler {
|
||||
@Override
|
||||
public void onError(int err) {
|
||||
Logger.t(TAG).d("onError" + err);
|
||||
CrashReport.postCatchedException(new Throwable("Trtc回调onError errCode="+err+" roomId="+AvRoomDataManager.get().getRoomId()));
|
||||
StatisticManager.Instance().logException(new Throwable("Trtc回调onError errCode="+err+" roomId="+AvRoomDataManager.get().getRoomId()));
|
||||
switch (err) {
|
||||
case 1107: {
|
||||
SingleToastUtil.showToast("发生未知错误,请退出房间重新进入");
|
||||
|
@@ -3,7 +3,7 @@ package com.nnbc123.core.manager.zego;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.tencent.bugly.crashreport.CrashReport;
|
||||
import com.nnbc123.core.statistic.StatisticManager;
|
||||
import com.nnbc123.xchat_android_constants.XChatConstants;
|
||||
import com.nnbc123.core.BuildConfig;
|
||||
import com.nnbc123.core.Env;
|
||||
@@ -86,7 +86,7 @@ public class ZegoEngineManager extends BaseEngine {
|
||||
} else {
|
||||
// 登录失败
|
||||
LogUtils.e("Zego onLoginCompletion: code: " + code);
|
||||
CrashReport.postCatchedException(new Throwable("enterChannel failed zegoCode = " + code + "channelId = " + channelId));
|
||||
StatisticManager.Instance().logException(new Throwable("enterChannel failed zegoCode = " + code + "channelId = " + channelId));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -51,4 +51,8 @@ class FirebaseStatistic {
|
||||
}
|
||||
firebaseAnalytics?.logEvent(eventId, bundle)
|
||||
}
|
||||
|
||||
fun logException(throwable: Throwable) {
|
||||
FirebaseCrashlytics.getInstance().recordException(throwable)
|
||||
}
|
||||
}
|
@@ -104,4 +104,10 @@ public class StatisticManager {
|
||||
|
||||
/*********************************************统计方法 end *********************************************/
|
||||
|
||||
public void logException(Throwable throwable) {
|
||||
if (throwable == null) {
|
||||
return;
|
||||
}
|
||||
firebaseStatistic.logException(throwable);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user