Class Index | File Index

Classes


Class Accelerometer


Defined in: phonegap.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
This class provides access to device accelerometer data.
Field Summary
Field Attributes Field Name and Description
 
The last known acceleration.
Method Summary
Method Attributes Method Name and Description
 
clearWatch(watchId)
Clears the specified accelerometer watch.
 
getCurrentAcceleration(successCallback, errorCallback, options)
Asynchronously aquires the current acceleration.
 
watchAcceleration(successCallback, errorCallback, options)
Asynchronously aquires the acceleration repeatedly at a given interval.
Class Detail
Accelerometer()
This class provides access to device accelerometer data.
Field Detail
lastAcceleration
The last known acceleration.
Method Detail
clearWatch(watchId)
Clears the specified accelerometer watch.
Parameters:
{String} watchId
The ID of the watch returned from #watchAcceleration.

getCurrentAcceleration(successCallback, errorCallback, options)
Asynchronously aquires the current acceleration.
Parameters:
{Function} successCallback
The function to call when the acceleration data is available
{Function} errorCallback
The function to call when there is an error getting the acceleration data.
{AccelerationOptions} options
The options for getting the accelerometer data such as timeout.

watchAcceleration(successCallback, errorCallback, options)
Asynchronously aquires the acceleration repeatedly at a given interval.
Parameters:
{Function} successCallback
The function to call each time the acceleration data is available
{Function} errorCallback
The function to call when there is an error getting the acceleration data.
{AccelerationOptions} options
The options for getting the accelerometer data such as timeout.

Documentation generated by JsDoc Toolkit 2.1.0 on Tue May 05 2009 14:44:46 GMT-0700 (PDT)