打开谷歌搜索页面 [英] open google search page

查看:143
本文介绍了打开谷歌搜索页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文本框,用户在输入文本在这里,我想知道我怎么能处理这个文本框,所以当用户输入文本,它会打开谷歌搜索页面和搜索的文字,我不想使用API ,只是打开浏览器谷歌网站和搜索文本。

I have a text box , and user enters text on here , I want to know how can I handle this textbox so when users enters a text , It opens google search page and search that text , I do not want to using apis , just opens google website in browser and searches for text .

感谢

推荐答案

下面是一个解决方案:

Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
String term = "TechnoTalkative";   // term which you want to search for
intent.putExtra(SearchManager.QUERY, term);
activity.startActivity(intent);

这篇关于打开谷歌搜索页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆