1.Bugly增加H5错误日志统计

This commit is contained in:
huangjian
2020-12-30 17:15:43 +08:00
parent f91cd59774
commit be3c8cc7c1
4 changed files with 15 additions and 6 deletions

View File

@@ -34,6 +34,7 @@ import com.netease.nim.uikit.StatusBarUtil;
import com.netease.nim.uikit.common.util.log.LogUtil;
import com.netease.nim.uikit.common.util.string.StringUtil;
import com.orhanobut.logger.Logger;
import com.tencent.bugly.crashreport.CrashReport;
import com.trello.rxlifecycle3.android.ActivityEvent;
import com.yizhuan.erban.R;
import com.yizhuan.erban.application.XChatApplication;
@@ -270,6 +271,14 @@ public class CommonWebViewActivity extends BaseActivity implements ShareDialog.O
});
//获取webviewtitle作为titlebar的title
wvcc = new WebChromeClient() {
@Override
public void onProgressChanged(WebView view, int newProgress) {
// 增加Javascript异常监控
CrashReport.setJavascriptMonitor(webView, true);
super.onProgressChanged(view, newProgress);
}
@Override
public void onReceivedTitle(WebView view, String title) {
super.onReceivedTitle(view, title);

View File

@@ -31,14 +31,14 @@
android:id="@+id/app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/translucent"
android:background="@color/transparent"
app:elevation="0dp"
app:layout_behavior="com.yizhuan.erban.ui.widget.AppBarLayoutBehavior">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:contentScrim="@color/translucent"
app:contentScrim="@color/transparent"
app:layout_scrollFlags="scroll|enterAlwaysCollapsed">
<androidx.recyclerview.widget.RecyclerView

View File

@@ -100,14 +100,14 @@
android:id="@+id/app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/translucent"
android:background="@color/transparent"
app:elevation="0dp"
app:layout_behavior="com.yizhuan.erban.ui.widget.AppBarLayoutBehavior">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:contentScrim="@color/translucent"
app:contentScrim="@color/transparent"
app:layout_scrollFlags="scroll|enterAlwaysCollapsed">
<LinearLayout

View File

@@ -21,5 +21,5 @@ with_jenkins=false
#\u6253\u652F\u6301x86\u7684\u6A21\u62DF\u5668\u5305\u4F7F\u7528
ndk_abi_filters=arm
version_name=2.0.2
version_code=202
version_name=2.1.1
version_code=211