Location APIs Logo

Location APIs

The location APIs make it easy for you to build location-aware applications, without needing to focus on the details of the underlying location technology. They also let you minimize power consumption by using all of the capabilities of the device hardware.

To get started, first set up the Google Play services SDK. You can learn how to use the APIs in the training class Making Your App Location Aware, and details are available in the Location API reference.

Key Developer Features

Fused location provider

The Fused Location Provider intelligently manages the underlying location technology and gives you the best location according to your needs.

  • Simple APIs: Lets you specify high-level needs like "high accuracy" or "low power", instead of having to worry about location providers.
  • Immediately available: Gives your apps immediate access to the best, most recent location.
  • Power-efficiency: Minimizes your app's use of power. Based on all incoming location requests and available sensors, fused location provider chooses the most efficient way to meet those needs.
  • Versatility: Meets a wide range of needs, from foreground uses that need highly accurate location to background uses that need periodic location updates with negligible power impact.

Geofencing APIs

Lets your app setup geographic boundaries around specific locations and then receive notifications when the user enters or leaves those areas.

  • Simple but powerful APIs: Allows batch addition and removal of geofences. Ability to manage multiple geofences at the same time. Ability to filter alerts for both entry and exit or entry only or exit only.
  • Optimized for battery: Adjusts location updates based on user’s proximity to the geofence and user’s modality (still, walking, driving, and so on).

Activity recognition

With apps becoming increasingly contextual, understanding what the user is doing is critical to surfacing the right content. The Activity recognition API makes it easy to check the user’s current activity—still, walking, cycling, and in-vehicle—with very efficient use of the battery.

  • Optimized for battery: Uses low-power sensors to recognize the user's current physical activity.
  • Enhances other services with context: Great for adding movement awareness to location awareness. Apps can adjust the amount of location awareness they provide, based on the current user movement. For example, a navigation app can request more frequent updates when the user is driving.
  • Features for advanced applications: For advanced applications that want to do their own post-processing, this API also makes available confidence values for each of the activities. It also includes two activities that indicate unreliable measurements: unknown and tilt.