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
)
Public Overridable Function SetLocationMode (
mode As LocationMode
) As Integer
Parameters
- mode
- Type: Com.Datalogic.Device.LocationLocationMode
- LocationMode indicates the mode to use by the location provider.
Return Value
Type:
Int32intSuccess in case of success,
otherwise a possible error code, matching one of the
DeviceException error constants.
Exceptions 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