Skip to content

Most visited

Recently visited

added in API level 1


Contains the framework API classes that define Android location-based and related services.

This API is not the recommended method for accessing Android location.
The Google Location Services API, part of Google Play services, is the preferred way to add location-awareness to your app. It offers a simpler API, higher accuracy, low-power geofencing, and more. If you are currently using the android.location API, you are strongly encouraged to switch to the Google Location Services API as soon as possible.

To learn more about the Google Location Services API, see the Location API overview.


GpsStatus.Listener This interface was deprecated in API level 24. use GnssStatus.Callback instead.  
GpsStatus.NmeaListener This interface was deprecated in API level 24. use OnNmeaMessageListener instead.  
LocationListener Used for receiving notifications from the LocationManager when the location has changed. 
OnNmeaMessageListener Used for receiving NMEA sentences from the GNSS. 


Address A class representing an Address, i.e, a set of Strings describing a location. 
Criteria A class indicating the application criteria for selecting a location provider. 
Geocoder A class for handling geocoding and reverse geocoding. 
GnssClock A class containing a GPS clock timestamp. 
GnssMeasurement A class representing a GNSS satellite measurement, containing raw and computed information. 
GnssMeasurementsEvent A class implementing a container for data associated with a measurement event. 
GnssMeasurementsEvent.Callback Used for receiving GNSS satellite measurements from the GNSS engine. 
GnssNavigationMessage A class containing a GNSS satellite Navigation Message. 
GnssNavigationMessage.Callback Used for receiving GNSS satellite Navigation Messages from the GNSS engine. 
GnssStatus This class represents the current state of the GNSS engine. 
GnssStatus.Callback Used for receiving notifications when GNSS events happen. 
GpsSatellite This class was deprecated in API level 24. use GnssStatus and GnssStatus.Callback.  
GpsStatus This class was deprecated in API level 24. use GnssStatus and GnssStatus.Callback.  
Location A data class representing a geographic location. 
LocationManager This class provides access to the system location services. 
LocationProvider An abstract superclass for location providers. 
SettingInjectorService Dynamically specifies the enabled status of a preference injected into the list of app settings displayed by the system settings app

For use only by apps that are included in the system image, for preferences that affect multiple apps. 

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields


Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (Dec 2017 Android Platform & Tools Survey)