title: Toast not showing up in UnCaughtExceptionHandler
body: <p>I am using this code to handle any uncaught exceptions which might cause my application to crash.</p>
  
  <pre><code>public class ExceptionHandler implements java.lang.Thread.UncaughtExceptionHandler {
      private final Context myContext;
  
      public ExceptionHandler(Context context) {
  
          myContext = context;
      }
  
      public void uncaughtException(Thread thread, Throwable exception) {
  
          Toast.makeText(myContext,
                  "The application has crashed, and a report is sent to the admin",
                  Toast.LENGTH_SHORT).show();
          StringWriter stackTrace = new StringWriter();
          exception.printStackTrace(new PrintWriter(stackTrace));
          System.err.println(stackTrace);// You can use LogCat too
          Intent intent = new Intent(myContext, CrashActivity.class);
          myContext.startActivity(intent);
          Process.killProcess(Process.myPid());
          System.exit(10);
      }
  }
  </code></pre>
  
  <p>When i run it with a known but uncaught exception(just to test), activity "CrashActivity" is called but the Toast which must come before it is not showing up.</p>
  
  <p>Actually i wanted to show only Toast and then call myContext.finish(); instead of going to the CrashActivity. But that toast in not visible.</p>
  
  <p>Where am i wrong?</p>