AccelerometerLib

このライブラリーは、装置の加速度センサーに対するアクセスを提供します。 加速度センサーとは、現在の装置の向きを基準にした x、y、および z の次元への移動における変化 (デルタ) を検出するモーション・センサーのことです。

レコード

Acceleration は加速度センサー・データを示します。

頻度: 加速度センサーを取得する間隔 (ミリ秒)。

関数
getCurrentAcceleration (onSuccess AccelerometerSuccess in, onError CordovaErrorHandler in)
これは、現在の加速度を取得して、onSuccess コールバック関数に戻ります。
onSuccess
AccelerometerSuccess の成功コールバック。 加速度が渡されます。
delegate AccelerometerSuccess (acceleration Acceleration in) end
onError
エラー・コールバック関数。
watchAcceleration(onSuccess AccelerometerSuccess in, onError CordovaErrorHandler in, options AccelerometerOption in) returns(String)
これは、定期的に装置の現行加速度を取得して、その都度、onSuccess コールバック関数を実行します。
onSuccess
成功コールバック。
onError
エラー・コールバック関数。
options
監視間隔を識別するための AccelerometerOption のインスタンス。
clearWatch(watchID String in)
これは、加速度センサーの監視を停止します。
watchID
停止される監視の監視 ID。

フィードバック