请问,想实现搜索功能,可以打开默认浏览器,搜索传递字符值。
public void searchOnGoogle(String keywords){
---
}
有没有用指定过滤器的方法?
请问,想实现搜索功能,可以打开默认浏览器,搜索传递字符值。
public void searchOnGoogle(String keywords){
---
}
有没有用指定过滤器的方法?
String query = URLEncoder.encode(keywords, "utf-8");
String url = "http://www.google.com/search?q=" + query;
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
startActivity(intent);