CustomActivityOnCrash

Android library that allows launching a custom activity when your app crashes, instead of showing the hated "Unfortunately, X has stopped" dialog.

APACHE-2.0 License

Stars
3.7K
Committers
9

Bot releases are hidden (Show)

CustomActivityOnCrash - 2.4.0 Latest Release

Published by Ereza over 2 years ago

  • New installation instructions, please review them if you are using Firebase: an additional step is required in this case. Closes #75, #80.
  • Bump minSdkVersion to 16.
  • Catch exceptions thrown by EventListener so we don't crash while a crash is occurring. Closes #71.
  • Hide the app build date if it's before 1990. Since recent Gradle versions do not set this attribute anymore, I'm considering removing it in future releases.
  • New CustomCrashDataCollector interface that allows specifying a class that will be invoked when a crash occurs in order to get additional data to be shown in the "error details" screen. Also added a new method CustomActivityOnCrash.getCustomCrashDataFromIntent(Intent) to retrieve the custom crash data reported by the CustomCrashDataCollector. Thanks @akallabeth for PR #77.
CustomActivityOnCrash - 2.3.0

Published by Ereza over 4 years ago

  • Migrated to AndroidX and latest dependencies.
  • When launching an activity and using the "silent" crash mode for background crashes, the library detected the app as in background and crashed silently. A new mechanism has been introduced: if a crash occurs less than 500 ms after an activity has been created, the app is considered in foreground and the error activity is shown instead of crashing silently. Closes #44.
  • A more trustworthy method of detecting possible restart loops has been implemented (if a crash somehow occurs in the error activity process, the library does not intercept it).
  • Added a null check to getConfigFromIntent. Closes #56.
  • Added OS version to the error details. Closes #57.
CustomActivityOnCrash - 2.2.0

Published by Ereza almost 7 years ago

  • Log the stack trace again when starting the new process. Closes #35. Can be disabled using logErrorOnRestart(false).
  • Fix for the main app activity becoming duplicated in the activity stack in some cases. Closes #29.
  • Minor code/Lint fixes.
CustomActivityOnCrash - 2.1.0

Published by Ereza over 7 years ago

  • Fixed compilation issue when Proguard was enabled.
  • Added new config method to enable/disable the crash interception mechanism at runtime.
  • Added new config method to set the minimum time between crashes to decide if they are a restart loop.
CustomActivityOnCrash - 2.0.0

Published by Ereza over 7 years ago

  • Library initialization no longer needed! Now it is automatic.
  • Fixed issue that caused Firebase Crash Reporting-enabled apps to not receive any crash report on Firebase. Closes #28.
  • Changed initialization of the library config to use the Builder pattern.
  • New crash mode for background crashes: "crash" (crashes normally when in background).
  • Library now depends on AppCompat, therefore eliminating all theme compatibility issues. minSdkVersion is now 14. Closes #26, #30.
  • New activity log (optional), thanks @bourmhe! Closes #27.
CustomActivityOnCrash - 1.5.0

Published by Ereza over 8 years ago

-Merged #17 (thanks again @alorma!)
-Fixed an issue when logging the results of getAllErrorDetailsFromIntent (#18).
-Fixed an issue that made the library not work when other applications on the device declare the ERROR or RESTART intent filters (#21)
-The library checks for restart loops by setting a shared preference with the most recent crash timestamp. If another crash occurs in less than 2 seconds, the library assumes it's a restart loop and uses the default exception handler in order to stop it from infinitely restarting (#19).
-The library now uses the default exception handler when an error occurs in Application or error activity classes, or when a restart loop is detected.

CustomActivityOnCrash - 1.4.0

Published by Ereza about 9 years ago

-New method to set the default error activity image drawable/mipmap, closes #11.
-Allows copying the crash information to the device clipboard, closes #10 (thanks @Sloy for the fix in #14!)
-Updated targetSdkVersion to 23.

CustomActivityOnCrash - 1.3.0

Published by Ereza about 9 years ago

-Activity stack is now correctly cleared when invoking the error activity or restarting the app (thanks @hongyangAndroid for pointing it out on #9!)
-Now only one process is run at a time, so there is no possibility of multiple Application instances running at the same time, fixes #8.
-Deprecated methods have been removed.

CustomActivityOnCrash - 1.2.0

Published by Ereza about 9 years ago

-Restart and error activity now settable via intent-filter (thanks @AizazAZ, @alorma), closes #5
-If the restart activity is not specified, it is automatically guessed via PackageManager.getLaunchIntentForPackage() (thanks @AizazAZ), closes #4
-Some methods have been deprecated, they will be removed in the next version.

CustomActivityOnCrash - 1.1.0

Published by Ereza about 9 years ago

-Now uses a default error activity by default (thanks to @alorma / @bernatbp)
-Refactored the initializing procedure, no more excessive method parameters
-Better documentation

CustomActivityOnCrash - 1.0.0

Published by Ereza about 9 years ago

Initial release as a library.

CustomActivityOnCrash - 1.0.1

Published by Ereza about 9 years ago

-Remove thread creation during shutdown, solves crash on API>=21.
-Remove some Lint warnings.
-First version published to Maven Central.