title: Firebase Crashlytics With UncaughtExceptionHandler
body: <p>I have integrated Firebase Crashlytics version 2.9.1 to digging out crashes to cover performance and stability of my app. </p>
  
  <p>Crashes are not being logged on firebase crashlytics console if application is having own UncaughtExceptionHandler. </p>
  
  <p>I have BaseActivity in my app. 
  inside onCreate() method I have registered custom UncaughtExceptionHandler based on project requirement. </p>
  
  <p>Whenever app got crashed due to any reason, user should be redirected to splash screen (<code>MainActivity.java</code>) .</p>
  
  <pre><code>public class BaseActivity extends FragmentActivity{ 
  
  @Override 
  protected void onCreate(Bundle arg0) { 
     // Enable global crash handler. 
     Thread.setDefaultUncaughtExceptionHandler(handleAppCrash); 
  } 
  
  /*** 
  * @Purpose Called when any crash occurs in the application. 
  ***/ 
  private Thread.UncaughtExceptionHandler handleAppCrash = new Thread.UncaughtExceptionHandler() { 
  @Override 
  public void uncaughtException(Thread thread, Throwable ex) { 
  
     Intent intent = new Intent(context, MainActivity.class); //redirect to Splash screen
     intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); 
     context.startActivity(intent); 
     System.exit(0); 
    } 
  }; 
  
  } 
  </code></pre>