捕获应用的 UncaughtException,应用崩溃时提供崩溃的类名、方法名、行数、Error Log、Activity 路径、设备信息、应用信息...同时支持复制、分享和保存崩溃信息。方便在开发和测试时使用
- 监控 App 整个生命周期
- 优雅捕获所以 UncaughtException
- 崩溃时直接展示崩溃信息、格式化显示崩溃信息
- 复制、分享、保存崩溃日志
- 使用者可以拦截崩溃自行处理如何配置
- Crash
ClassName
、MethodName
、LineNumber
、CrashInfo
- Device/mobile info.
- Application info.
- Crash log.
- Activity track. //optional
- All log files are placed in a separate folder.
Download the example app here
Project 根目录的 build.gradle 文件:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Application 或 Module 的 build.gradle 文件:
dependencies {
debugImplementation 'com.github.kingideayou.UCE-Handler:uce_handler:1.5.2'
releaseImplementation 'com.github.kingideayou.UCE-Handler:uce_handler_no_op:1.5.2'
}
-
Initialize library using builder pattern.
public class MyApplication extends Application { @Override public void onCreate() { ... // Initialize UCE_Handler Library new UCEHandler.Builder(this).build(); } }
UCEHandler.Builder(applicationContext).build()
.setUCEHCallback(new UCECallback() {
@Override
public void exceptionInfo(@Nullable ExceptionInfoBean exceptionInfoBean) {
Log.e("UCE-Handler", "exceptionInfo...");
}
@Override
public void throwable(@Nullable Throwable throwable) {
Log.e("UCE-Handler", "throwable...");
}
})
Optional Parameters | Default | Desc |
---|---|---|
setUCEHEnabled(true/false) |
true | Enable/Disable UCE_Handler. |
setTrackActivitiesEnabled(true/false) |
false | Choose whether you want to track the flow of activities the user/tester has taken or not. |
setBackgroundModeEnabled(true/false) |
true | Choose if you want to catch exceptions while app is in background. |
setUCEHCallback(UCECallback) |
null | You can handle catch exception infos yourself. |
- Rohit Surwase - Initial work - API-Calling-Flow , AndroidDesignPatterns , News App Using Kotlin, MVP , Linkaive - Android App on Play Store
- NeXT
Copyright © 2018 NeXT.
This project is licensed under the Apache License, Version 2.0 - see the LICENSE.md file for details