String st = et.getText().toString(); Uri uri = null; try { uri = Uri.parse("http://www.baidu.com/s?&ie=utf-8&oe=UTF-8&wd=" + URLEncoder.encode(st,"UTF-8")); } catch (UnsupportedEncodingException e1) { e1.printStackTrace(); } final Intent it = new Intent(Intent.ACTION_VIEW, uri); Timer timer = new Timer(); TimerTask task = new TimerTask() { @Override public void run() { startActivity(it); } }; timer.schedule(task, 0);