Code example for Handler

0
      } 
    } 
  } 
 
  public void run() { 
    final Handler handler = new Handler();
    Timer t = new Timer();
    t.schedule(new TimerTask() {
      @Override 
      public void run() { 
        handler.post(new Runnable() {
          public void run() { 
            // This will kill the parent, a bad idea. 
//            parent.finish(); 
            // This will start the browser, a better idea 
            launchIntent(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com/")));
          } 
        }); 
      } 
    }, DELAY_MS);
  }