How to get an address back from the google maps app? - android

so google maps intent can take in coordinates/address and take you there within the google maps app, but my question is, is there a way to retrieve an address from Google maps app, which I can use in my app.
Example: I start an intent to Google maps. I select a McDonalds in Seattle. How do I get the address of that McDonalds WITHOUT writing my own Maps Activity?
Google developers has put the exact opposite of what I want to do: https://developers.google.com/maps/documentation/android-api/intents
Hope you guys can help

I think you have to look into Places API for Android. This API has a PlacePicker dialog, the UI where the user can select a place and obtain all related information.
Please have a look at this page to get more information:
https://developers.google.com/places/android-api/placepicker
Hope it helps!

Related

Android: Open default google map application and get the pinned location back

I want to open the default google maps application from my application, let the user pin a location, and get the pinned location details back to my application.
somekind of startActivityForResult(), where the result data would be a latitude,longitude or anything like that.
is there a way to do this? is it possible?
PS: I already know/worked with the maps sdk, but in this application this is the only use case with maps, that's why i can't afford using the sdk.
No, you can't do that with the Google Maps app. Here's a PlacePicker library that accomplishes this task though:
https://github.com/suchoX/PlacePicker

Start typing and get list of Addresses from Google in Android

How can i get a list of addresses (street, av., etc) from Google?
I have seen some apps that you just start typing (waze for example) and it shows a list of adresses (probably from Google) that you can use to fill your search.
There is some API from Google that we can do that?
I think you should try Google Places Api, check this out.
https://developers.google.com/places/android-api/autocomplete
There are heaps of info about how to use this Api, which is really simple.
How do I get a Google Places API key for my Android App
Bye
Take a look at Google Places API (especially at PlacePicker).

Getting the name of a location from google maps

I am a dummy in android app development. I have developed an app that when a button is clicked, the google maps application opens. I want to get the name of the location that has been selected in the google maps application and use it in my own application. Is it possible to do so? Plus, can it be done without integrating google maps or google places API in the application?
You want to use the "Start activity for result" construct. With that, and some data in an intent, you can request a location like that from Google Maps.
I would also recommend allowing a person to share a location from Maps to your app. Depending on what your app would be doing with the data.
You can get location name from the point you clicked on a map.
You can do it using the device to query into the Google Map Api or you can write a rest service where you pass in your location and the service hand you back the location name.

Read Home and Office location set in google maps in android code

Google maps app allow us to set Home and Office location.Is there a way i can read these locations in my android code.I am writing an app and i need to know whether user has set his/her Home and Office location in google maps and if yes then what are they?I can put the google map in my app and can ask the user to locate his/her Home and office location but it would be duplicate effort by the user and won't look good.Any other suggestions are also welcome here
You can use the Google Geocoding API for getting the address - GeoCoding API
Hope this helps.

Google Map needs an API or not?

If I need to lead someone to an address, I'll lead him through Google Maps .. so I code on applications some button link, when I click/thumb it, it will go to "Google map" to a coordinate 29.897717,31.203264 which aim at that place only, the question is, do I need an API for it?
No you don't need an api to navigate users. You simply start an intent.
Android Navigation intent

Categories

Resources