-3

I want my own message should be showed when my app crashes or stopped working. Or when app crashes,any other activity should be displayed.In that time an Intent should be called

link

Refer the above link.

Maveňツ
  • 1
  • 12
  • 50
  • 89
sreenadh
  • 185
  • 1
  • 11

1 Answers1

1

USE DefaultUncaughtExceptionHandler

Public class YOURAPPLICATION extends Application
    {
      public void onCreate ()
      {
        // Setup handler for uncaught exceptions.
        Thread.setDefaultUncaughtExceptionHandler (new Thread.UncaughtExceptionHandler()
        {
          @Override
          public void uncaughtException (Thread thread, Throwable e)
          {
            handleUncaughtException (thread, e);
          }
        });
      }

      public void handleUncaughtException (Thread thread, Throwable e)
      {

       //CREATE YOUR ACTIVITY HERE.


      }
Piyush
  • 1,973
  • 1
  • 19
  • 30