views:

248

answers:

1

I am not able to get the ACTION_WEB_SEARCH to work correctly, does this require any permissions on the AndriodManifest.xml?

This is my code:

 String q = edittext.getText().toString();
 Intent myIntent = new Intent(Intent.ACTION_WEB_SEARCH, Uri.parse(q));
 startActivity(myIntent);

Any help would be much appreciated.

Platform 2.0.

+1  A: 
 String q = edittext.getText().toString();
 Intent intent = new Intent(Intent.ACTION_WEB_SEARCH );
 intent.putExtra(SearchManager.QUERY, q);
 startActivity(intent);
Jose Vega