• Stars
    star
    245
  • Rank 165,304 (Top 4 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created almost 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

See a pretty error screen when your Android app crashes

WhatTheStack

Banner

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, <your-app> has crashed".

Demo

Setup

Release

Add Jitpack repository in your root build.gradle file:

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

And then add the dependency to your app:

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 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:
<provider
  android:name="androidx.startup.InitializationProvider"
  android:authorities="${applicationId}.androidx-startup"
  android:exported="false"
  tools:node="merge">
  <meta-data  android:name="com.haroldadmin.whatthestack.WhatTheStackInitializer"
    android:value="androidx.startup"
      tools:node="remove"/>
</provider>

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'.
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!

More Repositories

1

NetworkResponseAdapter

Retrofit call adapter to model success/failed responses as sealed types
Kotlin
562
star
2

Vector

Kotlin Coroutines based MVI architecture library for Android
Kotlin
193
star
3

MoonShot

A SpaceX companion app for Android
Kotlin
161
star
4

lucilla

Fast, efficient, in-memory Full Text Search for Kotlin
Kotlin
127
star
5

MovieDB

A gorgeous TMDb client for Android
Kotlin
124
star
6

functions-differ

Tool to find Firebase Functions that changed for selective redeployments
TypeScript
39
star
7

Resumade

An Android app with a minimal material design that generates a resume for you
Kotlin
32
star
8

opengraphKt

A dead simple OpenGraph tags parser for Kotlin
Kotlin
21
star
9

json-formatter

Dead simple JSON formatter for the browser (Next.js, Tailwindcss, TypeScript)
TypeScript
8
star
10

getignore

Fetch gitignore files for your projects right from the command line
Go
7
star
11

dagger-mvrx-multimodule

Demonstrates usage of Dagger and MvRx in multi module apps
Kotlin
3
star
12

pathfix

Fixes the PATH environment variable of the current process
Go
3
star
13

EpoxyCarouselBugSample

Sample project for carousel scrolling bug in Epoxy
Kotlin
2
star
14

homebrew-pps

Homebrew Tap for the pps package
Ruby
2
star
15

translate_ref_generator

A Dart build plugin to make it easier to work with translation string files
Dart
2
star
16

UsageStatsManager-Sample

An app to demonstrate the usage of the UsageStatsManager API
Java
2
star
17

homebrew-getignore

Homebrew repository for getignore
Ruby
1
star
18

spacexkmp

A Kotlin Multiplatform wrapper for the SpaceX API
Kotlin
1
star
19

translate_ref

Annotations library for Translation Reference Generator
Dart
1
star
20

CMS

Semester project for Database Management System course (CO202)
JavaScript
1
star
21

UnitTestingSample

A sample app to help me learn unit testing through Junit 5 and Spek framework
Kotlin
1
star
22

MVRx-Lite

A lightweight state management library inspired from Airbnb's amazing MvRx library
Kotlin
1
star
23

pps

A parallel port scanner, not intended for real use
Go
1
star
24

Rosewood

An Android app to create a timeline of user interactions with their device
Kotlin
1
star