Android: access saved google locations

Google Maps lets you save your favorite places for easy access later ... see here .

In Android, where you need to enter a location, it would be neat if there was an API allowing the user to select from already saved favorite places, for example. through a dialogue of choice or something in that direction.

I can’t find such an API ... is there? The closest I found is this and, but they don't seem to allow you to select from your saved locations.

+7
android google-maps google-places-api
source share
2 answers

There is actually no way to do this, but you can create your own method for this. You may have an ImageButton with a star (or something that symbolizes "save"). Use SharedPreferences to save the latitudes and longitudes that have been entered by users, and then each time the application loads, you can check if there are any values ​​in SharedPreferences . If there is, you can use ListView to show all saved locations, and then when you click return parent activity with Location . Finally, use Location for the correct orientation of the map.

0
source share

Google / Android does not provide a public API for accessing a user's favorite / frequent locations, and this data is distributed only among Google applications.

Since this answer shows that it would be possible to get location data through the Google Plus platform APIs and Google Identity APIs

Alternatively (or in addition), using the Google Plus Platform / Google Identity Platform, if you have an authenticated user, you can make an API call as described here (with examples) to get any of the given fields for the current user (including currentLocation, organizations (including work) with addresses, if the user provided them).

Check out this link.

0
source share

All Articles