Skip to main content

Location

Location

Visit Sensors > Location for supported devices. This screen will allow you to set the Latitude, Longitude, and Altitude using the provided entry boxes. You can also navigate to a latitude/longitude of your choice by moving the map to the location of interest.

locations GIF

On iOS

Note that location data is provided only to UI applications as a user-mode implementation of CLLocationManager. Only raw location events are supported. Activity filtering, region monitoring, beacons, and visit events are not currently supported.

Location Services on newly created iOS devices are disabled by default. You may need to go into the Settings application and enable Location Services if your application does not request them to be enabled.

On Android

Note that these values are provided to the Android system as a GPS hardware change. This means you can read them utilizing the direct permissions android.permission.ACCESS_FINE_LOCATION and android.permission.ACCESS_COARSE_LOCATION.

Directly using location data

Ensure that the application you are trying to test has direct access to the GPS by requesting the correct permissions you would like, either android.permission.ACCESS_FINE_LOCATION or android.permission.ACCESS_COARSE_LOCATION.

A good Android application to test the changes for this is SatSat, which is open-sourced and can be found on F-droid or the GitHub page for the source code. You can also reference a JavaScript example for requesting and accepting the GPS data inside a WebKit component can be tested here and find the source code on the GitHub page.

Using a FusedLocationProvider

The Google FusedLocationProvider API enables functionality such as "Current Location." Without the FusedLocationProvider enabled, features such as centering on your current location in maps apps will not behave as expected.

To use the FusedLocationProvider, you will first need to install OpenGapps, which will install Google Play Services. Once that's installed, you will also need to install Google Maps via the Google Play Store or by side-loading. Next, you will need to run Google Maps at least once to activate the feature.

Google Services handles the FusedLocationProvider API interaction. When an application is subscribed to get location updates, Google Services relies on its services to continually receive periodic locations to update the FusedLocation. This is why you must install and run Google Maps at least once to activate this feature.