Code example for Handler

Methods: post

3
    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);
  } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE