Skip to content

rajatkdhamija/RedScreenOfDeath

Repository files navigation

Red Screen Of Death

What

A simple screen that is shown when your app gets crashed instead of the normal crash dialog.

It's very similar to the one in Flutter/React Native.

Install

RedScreenOfDeath is distributed via jitkpack.io. Add the dependencies to your build.gradle file.

In your build.gradle:

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

dependencies {
    implementation 'com.github.rajatkdhamija:RedScreenOfDeath:1.4'
}

In your Application class:

  • Kotlin
class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()
        RedScreenOfDeath.initRSOD(this, BuildConfig.BUILD_TYPE)
    }
}
  • Java
public class MyApp extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        RedScreenOfDeath.initRSOD(this, BuildConfig.BUILD_TYPE);
    }
}

And you are done!

Disclaimer

This will only work in debug build, to make it work on release app pass "debug" as second parameter in initRSOD