take the results of a google search - android

I am working on an Android application and I want make a search in google and save the results in a data structure in order to use them. Can someone indicate me an instrument that I can use? Thank you

You can just contact the google api for searching and parse the json or xml results, extracting exactly what information you want.google-search

Related

Search places by type in Android Google places api

I tried hard to find the way to search places by setting query parameter along with type inGeoDataClient.getAutocompletePredictions()api.
But i could not find any way to find exact places with type or name as supplied query.
if i pass 'airport' it gives so many result like places having 'airport' in description or name.
I just need airports nearby from this api, Guys please help, only option till now is to use web services. But as an android developer i want to use android api.
Thanks in advance.

Google Places API - any way to enumerate the Place Types list?

My question is in the context of an Android app providing users with a way to add Places to the Google Places database. Regarding this page:
https://developers.google.com/places/supported_types
After extensive searching, I've been unable to find a way to retrieve these types from the API in a manner suitable for presentation to the user. Does anyone know a way to accomplish this, or is there a built-in dialog I can call (similar to the Place Picker)?
Thank you in advance.
I see this is old so you've likely worked around your issue by now. For the benefit of others, here's a work around since Google seems to have left us dangling on this one.
First, I've created a small data file having all of Google's constants (as of this posting date) associated with friendly names. The two values are separated by commas.
Here's a link to the file:
https://drive.google.com/open?id=0B_33r2IAzcMibndhT2RicWdLUXc
This file can be formatted in JSON if you wish, or read as is. Use it as a source for an AutoCompleteTextView DataAdapter, so the users can easily select a place type. I haven't written the code yet. My needs are different than yours so my code won't meet your needs, but it should be pretty easy to implement an AutoCompleteTextView with this data.

Android - find image link API

Hey !
I have an Android app where the user can search on a specific subject, let's take the word "Cats" for example. When the user submits the search I want to find an image similar or on the subjects the searched for. A search engine for images more or less. I want something "easy" to deal with, so I thought about integrating the Google Search API into my app. Let the user search Google, and take the first image that comes up.
However, I haven't found any example and I just need a push in the right direction. If you could give me an example API for my needs, that'd be great.
Apparently the Google Search API never was fully deprecated it's still up and running. It provides JSON data and is easily parsed with Android.
If anyone else needs an image API here's a test search: https://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=searchquery&rsz=8&start=1&imgsz=small|medium
And the JSON reference: https://developers.google.com/image-search/v1/jsondevguide

Querying the time using Google Search Results

This one is puzzling me...
For my Android application I want to be able to return the current time in any location the user requests (right down to city level). The request itself comes from a voice command, so I cannot use alternative methods.
The most obvious way (so I thought) was to query Google, but I need your brains to help me solve how to extract the data I want please!
In Google, query:
"What's the time in China"
You should see a 'widget' at the top displaying the answer nicely. View the page source and search on 'China' and it's there - I thought great, this is going to be easy!
But...
"What's the time in London"
Although the display in Google appears the same, there is no result for 'London' when searching the source HTML...?
Using Google Chrome, I inspect the element of the 'widget' and can then view the contents I wish to extract in all cases.
So, my questions is firstly, am I missing something obvious (Google don't want us to be able to do this for example)? Or is there a way to 'force' the result to be in the HTML by structuring the query perhaps?
Secondly, is there a way to access the specific 'element container' and return the results to my Android Application?
I thank you in advance...
You should really use an API instead of parsing html.
I guess there are many many API which will give you the time in a given city.
http://www.worldweatheronline.com/time-zone-api.aspx for example (havnt tried it myself)
If you still want to extract data from the google result (which is html), check for html parsers like in this post : Parse HTML in Android

Better Understanding Using Google Places Api

I want to develop an application in which i want to display restaurants nearby the user.
Say for example i want to display name and address of restaurants located within 3km related to current location of the android device..
I have done alot of reading online and found different links here on stackoverflow.com
I am aware that I must use the GOOGLE PLACES API, I found this link to this blog on this site Introducing the Google Places API
My problem is how to use android/Java to:
1. Send a request to this url : "https://maps.googleapis.com/maps/api/place/search/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=MYAPIKEY"
2. Then parse the XML or JSON results from this request and display them in a list for the user to see.
Thank you in advance for anyone that can help.
You may want to look at some online tutorials like for instance
http://blog.brianbuikema.com/2010/08/android-development-part-1-using-googles-places-api-to-develop-compelling-location-based-mobile-applications/

Categories

Resources