Skip to content

Commit 1f463e6

Browse files
committed
feat: Add README
1 parent e2687f2 commit 1f463e6

File tree

3 files changed

+36
-300
lines changed

3 files changed

+36
-300
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# WhatTheStack
2+
3+
WhatTheStack is a library to make your debugging experience on Android better.
4+
5+
WhatTheStack shows you a pretty error screen when your Android App crashes, instead of a boring old dialog saying "Unfortunately, \<your-app\> has crashed".
6+
7+
## Setup
8+
9+
All that is needed to initialize this library is to use the `init()` method in the `onCreate()` callback of your custom Application class.
10+
11+
```kotlin
12+
class MyApp : Application() {
13+
override fun onCreate() {
14+
super.onCreate()
15+
WhatTheStack(this).init()
16+
}
17+
}
18+
```
19+
20+
And when an error is thrown in your application, you shall be greeted with a screen similar to this:
21+
22+
![ScreenShot](media/screenshot.jpeg)]
23+
24+
## Under the hood
25+
26+
This library works by setting a default uncaught-exception-handler on your app. When an uncaught exception is thrown, it is caught by this handler and sent to the library to parse and display to you. This is accomplished by running a bound service in a separate process than your app.
27+
28+
Running in a separate process is important because when an uncaught exception is thrown, the main thread of your application becomes unable to perform an UI related actions, and hence can't launch an intent to display the error screen shipped with this library. Therefore, running in a separate process allows us to perform UI related actions even when the main thread of the app process has stopped.
29+
30+
## Installation
31+
32+
Instructions will be posted here soon!
33+
34+
## Contributing
35+
36+
Contributions to this library are very welcome. I threw this together over one weekend, and it hasn't been thoroughly tested. Community validation and contributions would therefore be great.

media/screenshot.jpeg

139 KB
Loading

projectFilesBackup/.idea/workspace.xml

Lines changed: 0 additions & 300 deletions
This file was deleted.

0 commit comments

Comments
 (0)