Modules.CoreMotion.Altimeter
Allows Titanium client applications to access CoreMotion's Altimeter APIs. Note: This API is only available in iOS 8 and later.
Extends: Titanium.Proxy · Since: 8.3.0 · Platforms: iphone, ipad
Methods #
hasAltimeterPermissions #
Determines whether the device supports reporting relative altitude changes.
Returns: Boolean
isRelativeAltitudeAvailable #
Returns a Boolean value indicating whether the altimeter is supported on the current device.
Returns: Boolean
isSupported #
Returns a Boolean value indicating whether the altimeter is supported on the current device. Returns true for iOS 8+.
Returns: 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 Modules.CoreMotion.Altimeter.stopRelativeAltitudeUpdates
even if an error is returned to the handler.
| Name | Type | Summary | Optional |
|---|---|---|---|
callback | Callback<CoreMotionAltimeterData> | The method to be called when there is an update. | Yes |
stopRelativeAltitudeUpdates #
Stops relative altitude updates.