Every Android developer knows this situation:
Your app is working perfectly during testing, but then a real user hits an unexpected crash.
Maybe it is a lifecycle issue.
Maybe it is a null value.
Maybe it is a device-specific bug.
Maybe it is a third-party SDK problem.
The crash itself is already bad, but the user experience after the crash is often worse.
By default, Android gives users a generic crash experience. It does not look branded, it does not explain much, and it does not help users recover properly.
That is why I worked on CrashX v7.0.1.
CrashX is a modern Android crash recovery library that replaces the default crash dialog with a clean, customizable crash screen.
It supports restart, close, error details, crash IDs, copy-to-clipboard, crash report sharing, app/device metadata, Activity lifecycle logs, and full UI customization.
It is now also available on Maven Central.
What is CrashX?
CrashX is an Android library that catches uncaught Java/Kotlin exceptions and opens a custom error screen instead of immediately showing only the default Android crash dialog.
The goal is simple:
Give users a better recovery experience and give developers better crash context.
CrashX helps you:
- Show a professional crash screen
- Let users restart the app safely
- Let users close the app cleanly
- Show or hide technical crash details
- Share crash reports through email or Android share sheet
- Add support email integration
- Display a unique crash ID
- Include app/device/crash metadata
- Track recent Activity lifecycle events
- Prevent infinite crash restart loops
- Customize the crash screen UI
Why I upgraded CrashX
CrashX started as a maintained and modified derivative of the excellent open-source library CustomActivityOnCrash, originally created by Eduard Ereza Martínez.
For v7, I wanted to make the project stronger in two ways:
- Improve the actual Android crash recovery experience.
- Make the open-source attribution and licensing fully transparent.
So CrashX now clearly documents its relationship with the original project, preserves the Apache License 2.0, includes a NOTICE file, and gives visible credit to the original author.
Open-source maintenance should respect the original work. That was an important part of this release.
What is new in CrashX v7.0.1?
CrashX v7.0.1 is focused on modernization, customization, reporting, and reliability.
Maven Central support
CrashX is now available on Maven Central.
implementation 'io.github.tutorialsandroid:crashx:7.0.1'
For Kotlin DSL:
implementation("io.github.tutorialsandroid:crashx:7.0.1")
JitPack is also supported as an alternative:
implementation 'com.github.TutorialsAndroid:crashx:v7.0.1'
Installation
Add Maven Central in your root settings.gradle or settings.gradle.kts.
Kotlin DSL
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
Then add CrashX:
dependencies {
implementation("io.github.tutorialsandroid:crashx:7.0.1")
}
Groovy DSL
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
Then add CrashX:
dependencies {
implementation 'io.github.tutorialsandroid:crashx:7.0.1'
}
CrashX v7.x is designed for modern Android projects:
android {
defaultConfig {
minSdk 23
}
}
Quick test
After adding the dependency, force a test crash:
throw new RuntimeException("Test CrashX crash");
Instead of only seeing the default Android crash dialog, your app will open the CrashX crash recovery screen.
Basic setup
It is recommended to configure CrashX inside your Application class.
import android.app.Application;
import com.developer.crashx.config.CrashConfig;
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
CrashConfig.Builder.create()
.backgroundMode(CrashConfig.BACKGROUND_MODE_SHOW_CUSTOM)
.enabled(true)
.showErrorDetails(true)
.showRestartButton(true)
.showCloseButton(true)
.showReportButton(true)
.showCopyButtonInDetails(true)
.trackActivities(true)
.apply();
}
}
Register it in AndroidManifest.xml:
<application
android:name=".MyApplication"
android:allowBackup="true"
android:theme="@style/AppTheme">
</application>
Full professional configuration
CrashX v7.0.1 includes many customization options.
CrashConfig.Builder.create()
.backgroundMode(CrashConfig.BACKGROUND_MODE_SHOW_CUSTOM)
.enabled(true)
// Core crash behavior
.showErrorDetails(true)
.showRestartButton(true)
.showCloseButton(true)
.showReportButton(true)
.showCopyButtonInDetails(true)
.logErrorOnRestart(true)
.trackActivities(true)
.minTimeBetweenCrashesMs(3000)
// Crash screen text
.errorTitle("Oops! The app crashed")
.errorMessage("Something unexpected happened. Please restart the app or send a crash report to help us fix it.")
.restartButtonText("Restart app")
.closeButtonText("Close app")
.detailsButtonText("View technical details")
.reportButtonText("Send crash report")
.copyButtonText("Copy details")
// Crash report options
.supportEmail("support@example.com")
.reportSubject("Crash report from my Android app")
.reportChooserTitle("Send crash report using")
.additionalReportInfo("Environment: Production")
// Visibility and report metadata
.showCrashId(true)
.showAppInfo(true)
.includeDeviceInfo(true)
.includeActivityLog(true)
.includeStackTrace(true)
.includeBuildDate(true)
.includeCrashId(true)
.crashIdPrefix("CRASHX")
// Limits
.maxActivityLogEntries(50)
.maxStackTraceSize(128 * 1024)
// UI colors
.backgroundColor(0xFFB91C1C)
.cardBackgroundColor(0xFFFFFFFF)
.primaryButtonColor(0xFFB91C1C)
.secondaryButtonColor(0xFFF3F4F6)
.titleTextColor(0xFF111827)
.messageTextColor(0xFF4B5563)
.buttonTextColor(0xFFFFFFFF)
.secondaryButtonTextColor(0xFF111827)
.metaTextColor(0xFF6B7280)
.apply();
Crash IDs
One of the useful v7 features is Crash ID support.
.showCrashId(true)
.crashIdPrefix("CRASHX")
CrashX generates a unique ID for each crash.
This is useful for support teams because a user can send the crash ID, and the developer can match it with logs or reports.
Crash report sharing
CrashX can show a report button on the crash screen.
.showReportButton(true)
.supportEmail("support@example.com")
.reportSubject("Crash report from my Android app")
.reportChooserTitle("Send crash report using")
The report can include:
- Crash ID
- Package name
- App version
- CrashX version
- Android version
- API level
- Device model
- Brand
- Manufacturer
- Crash date
- Crash thread
- Throwable class
- Throwable message
- Build date
- Stack trace
- Activity lifecycle log
- Additional developer-defined information
This makes debugging easier because the user does not need to manually copy logs from Logcat.
Copy crash details
CrashX can also show a copy button inside the details dialog.
.showCopyButtonInDetails(true)
.copyButtonText("Copy details")
This is helpful for QA testers, internal builds, and debug environments.
Activity lifecycle tracking
CrashX can track recent Activity lifecycle events before the crash.
.trackActivities(true)
.includeActivityLog(true)
.maxActivityLogEntries(50)
Example log:
2026-05-25 14:10:01: MainActivity created
2026-05-25 14:10:02: MainActivity resumed
2026-05-25 14:10:15: ProfileActivity created
2026-05-25 14:10:16: ProfileActivity resumed
This can help identify what screen or flow the user was in before the crash.
UI customization
CrashX lets you customize text:
.errorTitle("Oops! Something went wrong")
.errorMessage("The app ran into an unexpected problem. Please restart the app.")
.restartButtonText("Restart now")
.closeButtonText("Close")
.detailsButtonText("Technical details")
.reportButtonText("Send report")
.copyButtonText("Copy details")
And colors:
.backgroundColor(0xFF111827)
.cardBackgroundColor(0xFFFFFFFF)
.primaryButtonColor(0xFF2563EB)
.secondaryButtonColor(0xFFF3F4F6)
.titleTextColor(0xFF111827)
.messageTextColor(0xFF4B5563)
.buttonTextColor(0xFFFFFFFF)
.secondaryButtonTextColor(0xFF111827)
.metaTextColor(0xFF6B7280)
This helps make the crash screen feel like part of your app, not a random system screen.
Debug configuration
For debug builds, I prefer showing full technical information.
CrashConfig.Builder.create()
.enabled(true)
.showErrorDetails(true)
.showRestartButton(true)
.showCloseButton(true)
.showReportButton(true)
.showCopyButtonInDetails(true)
.trackActivities(true)
.includeDeviceInfo(true)
.includeActivityLog(true)
.includeStackTrace(true)
.includeBuildDate(true)
.includeCrashId(true)
.errorTitle("Debug crash")
.errorMessage("CrashX caught this crash in debug mode. Open details to inspect the stack trace.")
.apply();
Production configuration
For production builds, I prefer a cleaner user-facing experience.
CrashConfig.Builder.create()
.enabled(true)
.showErrorDetails(false)
.showRestartButton(true)
.showCloseButton(true)
.showReportButton(true)
.showCopyButtonInDetails(false)
.trackActivities(false)
.includeDeviceInfo(true)
.includeActivityLog(false)
.includeStackTrace(true)
.includeBuildDate(true)
.includeCrashId(true)
.supportEmail("support@example.com")
.errorTitle("Something went wrong")
.errorMessage("The app ran into an unexpected problem. Please restart the app or report the issue.")
.apply();
Custom error activity
If you want complete control, you can use your own crash screen.
public class MyCrashActivity extends AppCompatActivity {
private CrashConfig config;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_my_crash);
config = CrashActivity.getConfigFromIntent(getIntent());
String crashId = CrashActivity.getCrashIdFromIntent(getIntent());
String stackTrace = CrashActivity.getStackTraceFromIntent(getIntent());
String fullDetails = CrashActivity.getAllErrorDetailsFromIntent(this, getIntent());
findViewById(R.id.btnRestart).setOnClickListener(v -> {
CrashActivity.restartApplication(this, config);
});
findViewById(R.id.btnClose).setOnClickListener(v -> {
CrashActivity.closeApplication(this, config);
});
}
}
Register it:
<activity
android:name=".MyCrashActivity"
android:process=":error_activity"
android:exported="false" />
Apply it:
CrashConfig.Builder.create()
.errorActivity(MyCrashActivity.class)
.apply();
Limitations
CrashX is designed for uncaught Java/Kotlin exceptions.
It does not catch every possible failure.
CrashX does not handle:
- ANRs
- Native crashes
- Low-level system kills
- Force stops by the operating system
- Crashes before the library is initialized
- Some multiprocess edge cases
- Errors inside the crash activity itself
CrashX improves crash recovery, but it is not a replacement for proper testing, crash monitoring, logging, or bug fixing.
Open-source attribution
CrashX is a maintained and modified derivative of CustomActivityOnCrash, originally created by Eduard Ereza Martínez.
The project keeps the Apache License 2.0, preserves attribution, includes a NOTICE file, and clearly documents its relationship with the original project.
This was an important part of the v7 update because open-source work should always respect original authors and contributors.
Final thoughts
CrashX v7.0.1 is a full modernization release.
The biggest improvements are:
- Maven Central availability
- JitPack support
- Crash ID generation
- Crash report sharing
- Copy-to-clipboard support
- Configurable crash UI
- Activity lifecycle logs
- Safer crash-loop protection
- Better crash metadata
- Clear open-source attribution
If you are building Android apps and want a better crash recovery experience, CrashX can help you give users a more professional fallback screen when something goes wrong.
GitHub repository:
https://github.com/TutorialsAndroid/crashx
Maven Central dependency:
implementation 'io.github.tutorialsandroid:crashx:7.0.1'
JitPack dependency:
implementation 'com.github.TutorialsAndroid:crashx:v7.0.1'
Thanks for reading. If you find CrashX useful, consider starring the repository and sharing feedback.

Top comments (0)