

Returns a string containing a concise, human-readable description of this object. Set the speed, in meters/second over ground.

Set the altitude, in meters above sea level. Set the estimated accuracy of this location, meters. Get the speed if it is available, in meters/second over ground. Get the altitude if available, in meters above sea level. Get the estimated accuracy of this location, in meters. Returns the approximate distance in meters between this location and the given location. There are following important methods which you can use with Location object to get location specific information − Sr.No. The Location object represents a geographic location which can consist of a latitude, longitude, time stamp, and other information such as bearing, altitude and velocity. This tutorial shows you how to use Location Services in your APP to get the current location, get periodic location updates, look up addresses etc. This becomes possible with the help of Google Play services, which facilitates adding location awareness to your app with automated location tracking, geofencing, and activity recognition. Just add the following in Gradle dependencies.Ĭompile ':play-services:6.5.Android location APIs make it easy for you to build location-aware applications, without needing to focus on the details of the underlying location technology. Add Google Play Services to project dependency.Then used the SHA1 key generated and the android application package to create and get the Android API key. Go to menu “APIs & auth –> Credentials” in ‘Public API access’ click create new Key button. Grab the SHA1 value from the above cmd prompt and then go back to Google Console to create Android API key.Keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android Create SHA1 Android key by running the following command in cmd prompt (you should have JDK installed and PATH setup).

Then go to menu “APIs & auth –> APIs” and switch on “Google Maps Android API v2”.

Next read through the, Markers–Google Maps Android API v2 to learn about showing a Google map and mark a location using latitude/longitude points. Refer the Android location using fused provider tutorial to understand better about the Android fused location provider API and how it can be used to access the user location. This deals mainly with two areas, using the location API to continuously get the user location and then showing that lat-long position in the Google maps. This Android tutorial will walk you through to create a location tracker using Android location API and Google maps services. Last modified on March 15th, 2015 by Joe.
