Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List of close places without using a map object on android

I am making a android application that needs to check if the user is close to a place of interest e.g. movie theater. (Within 1 km)

However I do not need the user to see a map which I think is required to use the google places api. I have done some research but am not sure how to accomplish this on android. Any tips (including comments or relevant links would be appreciated)

like image 498
Mark Donaghue Avatar asked Jan 22 '17 18:01

Mark Donaghue


People also ask

Can you make a list of stops on Google Maps?

In Google Maps, you can create a list of places, like your favorite places or places you want to visit.

Is Google Places autocomplete free?

The autocomplete request is available at no charge, and the subsequent Place Details call gets charged based on regular Place Details pricing. A Place Details request generates Data SKUs (Basic, Contact, and/or Atmosphere) – depending on the fields that are specified in the request.

How do I get nearby places on Android?

Go to Google API Console. Create a new project and generate a new API key corresponding to your SHA1 and application package name. To integrate google map and to access nearby places in your application enable Maps SDK for Android and Places API.


1 Answers

to see the nearby sites,

1.- use Nearby Search Requests from google maps, link here

2.- Use phone coordinates, to get a list of movie theater near of the coords...

https://maps.googleapis.com/maps/api/place/radarsearch/json?location=51.503186,-0.126446&radius=5000&types=movie+theater&key=YOUR_API_KEY

3.- compare the two coordinates, and do your magic, maybe get distance by that two points and show user the distance..

Note: if you want a lot of special places, you will need to see another way to do it. That's what I thought... is, in your server need to do a request by coords with a lot of nearest places, (museum,movie theater, etc.), and save that because google charges you when the server check in many times, when the user send the coordenates you will have a list of nearest places, if not, consult a list of best pleaces and save in your server and send to user,

you will need to use a some calculate coordenates, like range, if user is near of this coordenates that i have in database send that information if not, do request to server to consult nearest places (with your predefinite list)

Sorry for my English.

Links for more information
Find Places Nearby in Google Maps using Google Places API–Android App
Places APIs and Related Products
how to display nearby places like atm,hospitals in android google map?

like image 199
DarckBlezzer Avatar answered Dec 17 '22 09:12

DarckBlezzer