# Modules.CoreMotion.Altimeter

Allows Titanium client applications to access CoreMotion's Altimeter APIs. Note: This API is only available in iOS 8 and later.

Availability
8.3.0

# Methods

# authorizationStatus

Availability
8.3.0
authorizationStatus() Number

Returns the current authorization status for altimeter.

Returns

Type
Number

# hasAltimeterPermissions

Availability
8.3.0
hasAltimeterPermissions() Boolean

Determines whether the device supports reporting relative altitude changes.

Returns

Type
Boolean

# isRelativeAltitudeAvailable

Availability
8.3.0
isRelativeAltitudeAvailable() Boolean

Returns a Boolean value indicating whether the altimeter is supported on the current device.

Returns

Type
Boolean

# isSupported DEPRECATED

Availability
8.3.0
isSupported() Boolean

DEPRECATED SINCE 8.3.0

This API is supported on IOS 8+ and this module is now targeting iOS 8 as minimum, so this method will always return true.

Returns a Boolean value indicating whether the altimeter is supported on the current device. Returns true for iOS 8+.

Returns

Type
Boolean

# startRelativeAltitudeUpdates

Availability
8.3.0
startRelativeAltitudeUpdates([callback]) void

Starts relative altitude updates, providing data to the given handler on the given queue every few seconds. The first altitude update will be established as the reference altitude and have relative altitude 0.

Calls to start must be balanced with calls to stopRelativeAltitudeUpdates even if an error is returned to the handler.

Parameters

Name Type Description
callback Callback<CoreMotionAltimeterData>

The method to be called when there is an update.

Returns

Type
void

# stopRelativeAltitudeUpdates

Availability
8.3.0
stopRelativeAltitudeUpdates() void

Stops relative altitude updates.

Returns

Type
void