VERSION 0.3.1617

The Location module provides an interface for obtaining and working with location updates. It provides implementations for getting an actual user location with and without Google Services, as well as one for simulating locations.

To use the Location module, you need to configure the project and add the dependencies.

Project set up

  1. Configure the project as described in the Project setup guide.
  2. Add the module dependency in the build.gradle of your application module and synchronize the project.


The Location module provides different location provider implementations. To use each one you need to add its dependency in the module’s build.gradle.

  • AndroidLocationProvider – relies on the Android system location services, which does not require Google services.
    1dependencies {
    2 implementation "com.tomtom.sdk.location:provider-android:0.3.1617"
  • GmsLocationProvider – based on the Google service’s location updates.
    1dependencies {
    2 implementation "com.tomtom.sdk.location:provider-gms:0.3.1617"
  • ProxyLocationProvider - publishes locations that are programmatically provided .
    1dependencies {
    2 implementation "com.tomtom.sdk.location:provider-proxy:0.3.1617"
  • LocationProvider - an interface to implement with a custom location provider. It is included in all of the dependencies listed above.
    1dependencies {
    2 implementation "com.tomtom.sdk.location:provider:0.3.1617"

Location permissions

If the application is going to use user location data, you have to request the correct permissions. In particular, the user must grant location permission before the location provider can be used. Complete instructions to request location permissions on Android can be found here.

Next steps

Since you have learned how to use basic location functionality, here are recommendations for the next steps: