Start the browser with a search query in android.
In android we can simply start a browser or start the browser with a supplied search query.
Remember that we start the browser using an intent and we can put extra parameters in an intent.
Here in the browser intent we can supply the search query as a “SearchManager.QUERY” and giving the value.
Remember that we start the browser using an intent and we can put extra parameters in an intent.
Here in the browser intent we can supply the search query as a “SearchManager.QUERY” and giving the value.
1
2
3
| Intent search = new Intent(Intent.ACTION_WEB_SEARCH); search.putExtra(SearchManager.QUERY, "ANDROID" ); startActivity(search); |
No comments:
Post a Comment