2012-12-13 14 views
8

का उपयोग कर गूगल पर एक स्ट्रिंग खोज कैसे करने के लिए मुझे लगता है कि डिफ़ॉल्ट ब्राउज़र खोलें और खोज स्ट्रिंग पारितएक तरह से डिफ़ॉल्ट ब्राउज़र

public void searchOnGoogle(String keywords){ 
--- 
} 

एक खोज समारोह लागू करना चाहते हैं वहाँ है लक्ष्य फ़िल्टर का उपयोग कर या मैं से सब कुछ को लागू करना चाहिए खुद?

उत्तर

7
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); 
संबंधित मुद्दे