How to pick location like whatsapp does? - android

im running and app and i want it to be able to let the user pick the location like whatsapp does when you are sharing a location. The main idea is to let the user decide to show a place close where he is. Example:

You should check Google Places API (https://developers.google.com/places/training/?hl=en), send a query to them with your location and the filters you want to specify: kind of near places, distance, sort by relevance or distance... and show them where you need =)

Related

How to change https://www.google.co.uk/maps/search/#53.0725236,0.0423795,11.44z to be user location rather than mine?

I want to put a link to a simple google search in my app. So if I search myself this is the link...
https://www.google.co.uk/maps/search/dog+groomer+near+me/#53.0725236,0.0423795,11.44z
It obviously has my coordinates in it. Is there a way for me to change it to a generic link so it automatically uses the users location?
You will want to use Android's location manager. This will allow you to get the user's coordinates (as long as they have location enabled on their phone.)
https://developer.android.com/guide/topics/location/#location
https://developer.android.com/guide/topics/location/strategies
It is up to you what you do with this. You can do a quick string replace and insert the user's coordinates inside the url. Or you could even include the google maps component into your app and have the results show up right in your app.

How to fetch city events?

I wanted to venture into making apps. I wanted to make an app that gathers the events around the user location wise. I want the app to show the events close to user using the GPS of the phone. There is a city page where all the events are listed but I don't have any ideas how I will be able to fetch the data. What are the other ways I can go forward with this? It would be encouraging so that I can research further.
try this
http://www.last.fm/api/show/geo.getEvents
login this and get the api calls and use it in your code
i think you can use a combination of api's to give you the data you are looking for, one such provider i found was http://api.eventful.com/, you can probably even try including foursqaure and meetup's api and even facebook opengraph event api can also provide some handy data.

Users of an application on a map

I have seen some applications that display on a map the users who have the application in use or installed.
I'd like to implement something like this in my project, the problem is I do not know where to start ..
anyone know any reference I can read?
This is an image to try to explain what I want
Thanks in advance
Regards
When user installs app, get its location using GPS, send it to your Server save it there.
When you want to show map, get all locations saved on server and display it on map.
You can update user location each time application is launched, updated it on server as well.

Android - Is there a way to specify a location when sharing into Google+ app?

I am developing an app that allows the user to share an image to Google+. When I share the image into Google+ from my app, I want to be able to specify the location associated with the image (not the user's present location as set by Google+). Is there a way to do this? I.e., by setting some extra? Thanks!
When ever user takes an image thruogh your app,take the corresponding Geopoints simultaniously and save it to a db. Whenever the user try to upload the photo take the corresponding Geopoints associated with the imagepath and post it to G+ I hope this will be a good possibility to solve this problem.
If I remember correctly, images shared with Google+ need to be done via a ContentProvider. If you aren't already, can you add the LATITUDE and LONGITUDE columns to your content provider?
http://developer.android.com/reference/android/provider/MediaStore.Images.ImageColumns.html
Currently, it is not possible to prepopulate the "Location" portion of a post on behalf of the user. If the user previously used the location field, it will be enabled for subsequent posts. If they turned it off, they would have to reenable it for subsequent posts.

How can I take a text query, and get a location in Android?

I was wondering how I can channel or simulate Google Maps just in the sense of a user types in a location in text, such as a restaurant name and a city name. Then Google suggests 5 or so places they have indexed, and presumably they know the GPS coordinates because Google then puts them on a map. I want to be able to use that feature- not the map, just getting the location.
My goal is for a user to type in a query, 5 options or so to be shown, and if they user chooses one of them, then the GPS coordinates, or a location object, is saved representing that place.
Ideally I could just send the query to Google and steal the results back to my app. Obviously building my own database of locations and an algorithm to suggest them is out of the question.
Thanks for the help and advice in advanced!
Note 1: To clarify, this does NOT involve the current position of the user/device.
Note 2: I looked at the Google Maps add-on API, but it looks like that is for a visual map, not the querying a location part. You are already supposed to know your location, and it will map it.
Use geocoder.getFromLocationName, you get back a list of Address objects, in those objects you will find all the information you need about the location.
To test this on the simulator you need an image with the Google APIs included. In a device should be fine if you have the market installed.

Categories

Resources