title: How to have a callback for when a crash occurred, while using Crashlytics SDK?
body: <h2>Background</h2>
  
  <p>We use Crashlytics SDK to manage app crashes and get needed information about them.</p>
  
  <p>So far, the information that the SDK automatically gathered was enough</p>
  
  <h2>The problem</h2>
  
  <p>I'd like to add more information for each crash, such as: available&amp;total heap memory, activity stack,...</p>
  
  <p>Thing is, I don't see a way to achieve this.</p>
  
  <p>I know that the way Android framework works with unhandled exceptions is pretty easy (using <a href="http://developer.android.com/reference/java/lang/Thread.html#setDefaultUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler)" rel="noreferrer"><strong>Thread.setDefaultUncaughtExceptionHandler</strong></a>) and it's probably how the SDK works, but I can't find where to use the listener of the SDK itself.</p>
  
  <h2>What I've tried</h2>
  
  <ol>
  <li><p>The SDK has a listener, but it seems it's not of the current session, as shown <a href="https://stackoverflow.com/a/28319655/878126"><strong>here</strong></a>. The function name is "crashlyticsDidDetectCrashDuringPreviousExecution" , meaning it's of the previous session. Same callback was available before in deprecated methods.</p></li>
  <li><p>There are "<a href="https://docs.fabric.io/android/crashlytics/enhanced-reports.html#custom-logging" rel="noreferrer"><strong>Custom Logging</strong></a>" and "<a href="https://docs.fabric.io/android/crashlytics/enhanced-reports.html#custom-keys" rel="noreferrer"><strong>Custom Keys</strong></a>" features, but those occur when I call them (not right when the crash occurs).</p></li>
  </ol>
  
  <h2>The question</h2>
  
  <p>Is there a way to add extra information to Crashlytics right when a crash occurs ? </p>
  
  <p>If so, how?</p>