Click or drag to resize

LocationManagerSetLocationMode Method

Set the GPS location provider mode.

Namespace:  Com.Datalogic.Device.Location
Assembly:  datalogic-xamarin-sdk (in datalogic-xamarin-sdk.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public virtual int SetLocationMode(
	LocationMode mode
)

Parameters

mode
Type: Com.Datalogic.Device.LocationLocationMode
- LocationMode indicates the mode to use by the location provider.

Return Value

Type: Int32
intSuccess in case of success, otherwise a possible error code, matching one of the DeviceException error constants.
Exceptions
ExceptionCondition
DeviceException - in case of error, when exceptions are enabled through the ErrorManager singleton.
Remarks

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.

[Android Documentation]

See Also