Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/haroldadmin/WhatTheStack

See a pretty error screen when your Android app crashes
https://github.com/haroldadmin/WhatTheStack

android android-library debugging tooling

Last synced: about 2 months ago
JSON representation

See a pretty error screen when your Android app crashes

Awesome Lists containing this project

README

        

# WhatTheStack

![Banner](media/repo-banner.png)

WhatTheStack is a library to make your debugging experience on Android better.

It shows you a pretty error screen when your Android App crashes, instead of a boring old dialog saying "Unfortunately, \ has crashed".

![Demo](media/demo.gif)

## Setup

[![Release](https://jitpack.io/v/haroldadmin/WhatTheStack.svg)](https://jitpack.io/#haroldadmin/WhatTheStack)

Add Jitpack repository in your root `build.gradle` file:

```groovy
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
```

And then add the dependency to your app:

```groovy
dependencies {
debugImplementation 'com.github.haroldadmin:WhatTheStack:(latest-version)'
}
```

Now when an uncaught exception is thrown in your application, you will be greeted with a screen containing information about the crash. We support light and dark themes too!


## Usage

WhatTheStack works by overriding the default exception handler in your app. It processes any uncaught exception in your app, parses it to extract useful information, and then shows it in a pretty screen.

### Automatic Initialization

WhatTheStack uses the [Jetpack App Startup](https://developer.android.com/topic/libraries/app-startup) library to run automatically when your app starts. You don't need to write any code to initialize it manually.

Need to disable automatic initialization?
If you want to disable automatic startup, add the following lines to your Manifest file:

```xml



```

### Debug vs Release builds

We recommend using `WhatTheStack` in debug builds only. We see it as a tool to improve the experience of the developer, not the user.

Need to use it in release builds?
If you want to use WhatTheStack in release builds, replace the `debugImplementation` dependency with `implementation'.

```diff
dependencies {
- debugImplementation 'com.github.haroldadmin:WhatTheStack:(latest-version)'
+ implementation 'com.github.haroldadmin:WhatTheStack:(latest-version)'
}'
```

The library ships with Proguard rules to ensure that it works correctly even after minification.

### Multi-Process Service

`WhatTheStack` runs a bound service in a separate process to show you the error screen on a crash.

We need to run this code in a separate process because you can't reliably launch new Activities
in the host application's process after an uncaught exception is thrown.

## Contributions

We are happy to accept any external contributions in the form of PRs, issues, or blog posts.

Please consider starring the repository if you find it useful or intriguing!