2

In my application I have a button, to show the user his way to go, on a Google Maps view.

Is there a way to get the Home-/Work location of the user from Google Now?

tshepang
  • 12,111
  • 21
  • 91
  • 136
andre
  • 1,618
  • 2
  • 19
  • 38

1 Answers1

-1

You can use Google Maps API in your application and find out your location through existing methods like this

LocationManager service = (LocationManager) getSystemService(LOCATION_SERVICE);
Criteria criteria = new Criteria();
String provider = service.getBestProvider(criteria, false);
Location location = service.getLastKnownLocation(provider);
LatLng userLocation = new LatLng(location.getLatitude(),location.getLongitude());

credits : https://stackoverflow.com/a/14493351/2071742

Community
  • 1
  • 1
smophos
  • 343
  • 2
  • 10
  • 1
    I dont want the current location. I want the HOME-Location that google-now figures out after a while. – andre Feb 28 '13 at 11:28