PlatformLocationProvider Class

  • java.lang.Object
    • com.microsoft.azure.spatialanchors.PlatformLocationProvider

public class PlatformLocationProvider

Use this class to get an estimate of the current location of your device. A PlatformLocationProvider is typically passed to a [CloudSpatialAnchorSession](./cloudspatialanchorsession.md) to enable large-scale relocalization scenario with [Coarse Relocalization](https://aka.ms/CoarseRelocalization).

Constructor Summary

Constructor Description
PlatformLocationProvider()

Initializes a new instance with all sensors disabled.

Method Summary

Modifier and Type Method and Description
void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

BluetoothStatusResult getBluetoothStatus()

Checks whether sufficient sensor data is available to locate or create anchors tagged with Bluetooth signals.

GeoLocationStatusResult getGeoLocationStatus()

Checks whether sufficient sensor data is available to locate or create anchors tagged with geolocation.

GeoLocation getLocationEstimate()

Returns the latest estimate of the device's location.

SensorCapabilities getSensors()

Gets the sensors used by the session to locate anchors around you and annotate created anchors so that they can be found. On HoloLens and iOS, enabling a sensor for the first time will prompt the user for the necessary permissions. On Android, you need to obtain the relevant permission before enabling a sensor.

WifiStatusResult getWifiStatus()

Checks whether sufficient sensor data is available to locate or create anchors tagged with Wi-Fi signals.

void start()

Start tracking the device's location.

void stop()

Stop tracking the device's location.

Constructor Details

PlatformLocationProvider

public PlatformLocationProvider()

Initializes a new instance with all sensors disabled.

Method Details

finalize

protected void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

getBluetoothStatus

public BluetoothStatusResult getBluetoothStatus()

Checks whether sufficient sensor data is available to locate or create anchors tagged with Bluetooth signals.

getGeoLocationStatus

public GeoLocationStatusResult getGeoLocationStatus()

Checks whether sufficient sensor data is available to locate or create anchors tagged with geolocation.

getLocationEstimate

public GeoLocation getLocationEstimate()

Returns the latest estimate of the device's location.

getSensors

public SensorCapabilities getSensors()

Gets the sensors used by the session to locate anchors around you and annotate created anchors so that they can be found. On HoloLens and iOS, enabling a sensor for the first time will prompt the user for the necessary permissions. On Android, you need to obtain the relevant permission before enabling a sensor.

getWifiStatus

public WifiStatusResult getWifiStatus()

Checks whether sufficient sensor data is available to locate or create anchors tagged with Wi-Fi signals.

start

public void start()

Start tracking the device's location.

stop

public void stop()

Stop tracking the device's location.

Applies to