# Modules.CoreMotion.Altimeter
Allows Titanium client applications to access CoreMotion's Altimeter APIs. Note: This API is only available in iOS 8 and later.
# Methods
# authorizationStatus
Returns the current authorization status for altimeter.
Returns
- Type
- Number
# hasAltimeterPermissions
Determines whether the device supports reporting relative altitude changes.
Returns
- Type
- Boolean
# isRelativeAltitudeAvailable
Returns a Boolean value indicating whether the altimeter is supported on the current device.
Returns
- Type
- Boolean
# isSupported DEPRECATED
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
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
Stops relative altitude updates.
Returns
- Type
- void