Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android ACTION_WEB_SEARCH

Tags:

java

android

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.

like image 462
Jose Vega Avatar asked Nov 29 '22 19:11

Jose Vega


1 Answers

 String q = edittext.getText().toString();
 Intent intent = new Intent(Intent.ACTION_WEB_SEARCH );
 intent.putExtra(SearchManager.QUERY, q);
 startActivity(intent);
like image 88
Jose Vega Avatar answered Dec 07 '22 23:12

Jose Vega