0

Just like opening a video link in the youtube app (where the programmer needs to specify the app and activity package explicitly). How can I perform a Google search in the Google search app programmatically?

Shreemaan Abhishek
  • 986
  • 1
  • 6
  • 29

1 Answers1

0

Google offers a public search webservice API which returns JSON: http://ajax.googleapis.com/ajax/services/search/web. Documentation here

Java offers java.net.URL and java.net.URLConnection to fire and handle HTTP requests.

JSON can in Java be converted to a fullworthy Javabean object using an arbitrary Java JSON API. One of the best is Google Gson.

Nishith
  • 103
  • 1
  • 9