GithubHelp home page GithubHelp logo

strivemcally / uce-handler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kingideayou/uce-handler

0.0 1.0 0.0 4.56 MB

调试时捕获程序崩溃,可提供崩溃的类名、方法名、行数、Error Log、Activity 路径、设备信息、应用信息...

License: Apache License 2.0

Java 100.00%

uce-handler's Introduction

Project Status: Active – The project has reached a stable, usable state and is being actively developed. GitHub stars

UCE Handler

捕获应用的 UncaughtException,应用崩溃时提供崩溃的类名、方法名、行数、Error Log、Activity 路径、设备信息、应用信息...同时支持复制、分享和保存崩溃信息。方便在开发和测试时使用

Features

  • 监控 App 整个生命周期
  • 优雅捕获所以 UncaughtException
  • 崩溃时直接展示崩溃信息、格式化显示崩溃信息
  • 复制、分享、保存崩溃日志
  • 使用者可以拦截崩溃自行处理如何配置

提供的崩溃日志信息

  • Crash ClassNameMethodNameLineNumberCrashInfo
  • Device/mobile info.
  • Application info.
  • Crash log.
  • Activity track. //optional
  • All log files are placed in a separate folder.

示例图片

Example Image Example Animation

预览效果

Download the example app here

Setup

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.1'
        releaseImplementation 'com.github.kingideayou.UCE-Handler:uce_handler_no_op:1.5.1'
}
在应用的 Application 类初始化:
  • Initialize library using builder pattern.

      public class MyApplication extends Application {
      @Override public void onCreate() {
      	...
      	// Initialize UCE_Handler Library
      	new UCEHandler.Builder(this).build();
      } }
    
Kotlin 初始化
    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

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.

注意:「保存异常信息」需要提供读取本地存储空间权限

Authors & Contributers

Thanks To

License

Copyright © 2018 NeXT.

This project is licensed under the Apache License, Version 2.0 - see the LICENSE.md file for details

uce-handler's People

Contributors

rohitsurwase avatar kingideayou avatar rohitwoxi avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.