public class

LocationManager

extends Object
java.lang.Object
   ↳ com.datalogic.device.location.LocationManager

Class Overview

The LocationManager class provides access to geo-location related methods of the device.

Summary

Public Constructors
LocationManager()
This is the constructor of LocationManager.
Public Methods
int setLocationMode(LocationMode mode)
Set the GPS location provider mode.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public LocationManager ()

Added in revision 1

This is the constructor of LocationManager.

Throws
DeviceException in case of error.

Public Methods

public int setLocationMode (LocationMode mode)

Added in revision 1

Set the GPS location provider mode.

Note: on Android-Q onward, GPS and network sensors can't be toggled separately. For this reason any value but OFF is interpreted as the location mode is on.

Parameters
mode LocationMode indicates the mode to use by the location provider.
Returns
  • int SUCCESS in case of success, otherwise a possible error code, matching one of the DeviceException error constants.
Throws
DeviceException in case of error, when exceptions are enabled through the ErrorManager singleton.