我正在制作一个 android 应用程序,当按下快速搜索的 go 按钮时需要打开 webbrowser。我怎样才能做到这一点?它启动网络浏览器?这是我到目前为止得到的代码:
public class SearchFunction extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final Intent queryIntent = getIntent();
final String queryAction = queryIntent.getAction();
if (Intent.ACTION_SEARCH.equals(queryAction)) {
String searchKeywords = queryIntent.getStringExtra(SearchManager.QUERY);
//Is it here that i can start intents/webbrowser???
}
}
}