BUI logoBBjGeolocation::setHighAccuracy

Description

In BBj 11.00 and higher, this method sets the highAccuracy option for use in subsequent requests for geolocation information.

Syntax

Return Value

Method

void

setHighAccuracy(boolean highAccuracy)

Parameters

Variable

Description

highAccuracy

Indicates whether the application would like to receive the most accurate results available.

Return Value

None.

Remarks

The "highAccuracy" attribute provides a hint that the application would like to receive the best possible results. This may result in slower response times or increased power consumption. The user might also deny this capability, or the device might not be able to provide more accurate results than if the flag wasn't specified. The intended purpose of this attribute is to allow applications to inform the implementation that they do not require high accuracy geolocation fixes and, therefore, the implementation can avoid using geolocation providers that consume a significant amount of power (e.g. GPS). This is especially useful for applications running on battery-powered devices, such as mobile phones.

Example

rem ' BBjGeolocation::setHighAccuracy

sysgui! = bbjapi().openSysGui("X0")
geo! = sysgui!.getGeolocation()
geo!.setHighAccuracy(1)
highAccuracy = geo!.isHighAccuracy()
i = msgbox("isHighAccuracy: "+str(highAccuracy),0,"BBjGeolocation")
release

See Also

Geolocation API Specification

BBj Object Diagram for an illustration of the relationship between BBjObjects.