BUI logo BBjGeolocation::isHighAccuracy

Description

In BBj 11.0 and higher, this method returns the highAccuracy option that will be used in subsequent requests for geolocation information.

Syntax

Return Value

Method

boolean

isHighAccuracy()

Parameters

None.

Return Value

Returns whether subsequent requests for geolocation information will request the most accurate results available.

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 isHighAccuracy

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.