开发者

How do I search Google in an Android app?

开发者 https://www.devze.com 2023-04-06 07:56 出处:网络
I need to create an Android app that searches Google. I use this code: Intent browse开发者_如何学编程r=new Intent(Intent.ACTION_VIEW);

I need to create an Android app that searches Google. I use this code:

Intent browse开发者_如何学编程r=new Intent(Intent.ACTION_VIEW);
browser.setData(Uri.parse("http://google.com/#q=qwerty"));
startActivity(browser);

However, the browser loads the Google home page, whereas I need a page with results of searching for "qwerty".

How can I do it?


do you mean:

http://google.com/search?q=qwerty
0

精彩评论

暂无评论...
验证码 换一张
取 消