You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ld...@apache.org on 2014/07/07 19:50:21 UTC

[5/7] git commit: Lisa testing pulling in plugins for plugin: cordova-plugin-device-motion

Lisa testing pulling in plugins for plugin: cordova-plugin-device-motion


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/commit/d656e018
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/tree/d656e018
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/diff/d656e018

Branch: refs/heads/master
Commit: d656e01810d0f9d9713e5cc3e81cffb3c5f6a4d1
Parents: f8feedf
Author: ldeluca <ld...@us.ibm.com>
Authored: Tue May 27 21:21:49 2014 -0400
Committer: ldeluca <ld...@us.ibm.com>
Committed: Tue May 27 21:21:49 2014 -0400

----------------------------------------------------------------------
 doc/es/index.md |   1 +
 doc/fr/index.md |   1 +
 doc/it/index.md | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++
 doc/ko/index.md | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++
 doc/pl/index.md | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++
 doc/zh/index.md | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 586 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/d656e018/doc/es/index.md
----------------------------------------------------------------------
diff --git a/doc/es/index.md b/doc/es/index.md
index 188738d..f245da3 100644
--- a/doc/es/index.md
+++ b/doc/es/index.md
@@ -31,6 +31,7 @@ Este plugin proporciona acceso a acelerómetro del dispositivo. El acelerómetro
 *   Amazon fuego OS
 *   Android
 *   BlackBerry 10
+*   Firefox OS
 *   iOS
 *   Tizen
 *   Windows Phone 7 y 8

http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/d656e018/doc/fr/index.md
----------------------------------------------------------------------
diff --git a/doc/fr/index.md b/doc/fr/index.md
index f8142d2..16a7fe3 100644
--- a/doc/fr/index.md
+++ b/doc/fr/index.md
@@ -31,6 +31,7 @@ Ce plugin permet d'accéder à l'accéléromètre de l'appareil. L'accéléromè
 *   Amazon Fire OS
 *   Android
 *   BlackBerry 10
+*   Firefox OS
 *   iOS
 *   Paciarelli
 *   Windows Phone 7 et 8

http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/d656e018/doc/it/index.md
----------------------------------------------------------------------
diff --git a/doc/it/index.md b/doc/it/index.md
new file mode 100644
index 0000000..4dfbd02
--- /dev/null
+++ b/doc/it/index.md
@@ -0,0 +1,146 @@
+<!---
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+# org.apache.cordova.device-motion
+
+Questo plugin consente di accedere all'accelerometro del dispositivo. L'accelerometro è un sensore di movimento che rileva il cambiamento (*delta*) nel movimento relativo l'orientamento corrente del dispositivo, in tre dimensioni lungo l'asse *x*, *y*e *z* .
+
+## Installazione
+
+    cordova plugin add org.apache.cordova.device-motion
+    
+
+## Piattaforme supportate
+
+*   Amazon fuoco OS
+*   Android
+*   BlackBerry 10
+*   Firefox OS
+*   iOS
+*   Tizen
+*   Windows Phone 7 e 8
+*   Windows 8
+
+## Metodi
+
+*   navigator.accelerometer.getCurrentAcceleration
+*   navigator.accelerometer.watchAcceleration
+*   navigator.accelerometer.clearWatch
+
+## Oggetti
+
+*   Accelerazione
+
+## navigator.accelerometer.getCurrentAcceleration
+
+Ottenere l'attuale accelerazione lungo gli assi *x*, *y*e *z* .
+
+I valori di accelerazione vengono restituiti per la `accelerometerSuccess` funzione di callback.
+
+    navigator.accelerometer.getCurrentAcceleration(accelerometerSuccess, accelerometerError);
+    
+
+### Esempio
+
+    function onSuccess(acceleration) {
+        alert('Acceleration X: ' + acceleration.x + '\n' +
+              'Acceleration Y: ' + acceleration.y + '\n' +
+              'Acceleration Z: ' + acceleration.z + '\n' +
+              'Timestamp: '      + acceleration.timestamp + '\n');
+    };
+    
+    function onError() {
+        alert('onError!');
+    };
+    
+    navigator.accelerometer.getCurrentAcceleration(onSuccess, onError);
+    
+
+### iOS stranezze
+
+*   iOS non riconosce il concetto di ottenere l'accelerazione della corrente in un dato punto.
+
+*   Si deve guardare l'accelerazione e acquisire i dati di intervalli di tempo dato.
+
+*   Così, il `getCurrentAcceleration` funzione restituisce l'ultimo valore segnalato da un `watchAccelerometer` chiamare.
+
+## navigator.accelerometer.watchAcceleration
+
+Recupera il dispositivo di corrente `Acceleration` a intervalli regolari, eseguendo la `accelerometerSuccess` funzione di callback ogni volta. Specificare l'intervallo in millisecondi via la `acceleratorOptions` dell'oggetto `frequency` parametro.
+
+L'oggetto restituito guardare ID riferimenti intervallo orologio di accelerometro e può essere utilizzato con `navigator.accelerometer.clearWatch` a smettere di guardare l'accelerometro.
+
+    var watchID = navigator.accelerometer.watchAcceleration(accelerometerSuccess,
+                                                           accelerometerError,
+                                                           [accelerometerOptions]);
+    
+
+*   **accelerometerOptions**: Un oggetto con le seguenti chiavi opzionali: 
+    *   **frequenza**: la frequenza di recuperare il `Acceleration` in millisecondi. *(Numero)* (Default: 10000)
+
+### Esempio
+
+    function onSuccess(acceleration) {
+        alert('Acceleration X: ' + acceleration.x + '\n' +
+              'Acceleration Y: ' + acceleration.y + '\n' +
+              'Acceleration Z: ' + acceleration.z + '\n' +
+              'Timestamp: '      + acceleration.timestamp + '\n');
+    };
+    
+    function onError() {
+        alert('onError!');
+    };
+    
+    var options = { frequency: 3000 };  // Update every 3 seconds
+    
+    var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
+    
+
+### iOS stranezze
+
+L'API chiama la funzione di callback di successo nell'intervallo richiesto, ma limita la gamma di richieste alla periferica tra 40ms e 1000ms. Ad esempio, se si richiede un intervallo di 3 secondi, (3000ms), l'API richiede i dati dal dispositivo ogni secondo, ma esegue solo il callback di successo ogni 3 secondi.
+
+## navigator.accelerometer.clearWatch
+
+Smettere di guardare il `Acceleration` fanno riferimento il `watchID` parametro.
+
+    navigator.accelerometer.clearWatch(watchID);
+    
+
+*   **watchID**: l'ID restituito da`navigator.accelerometer.watchAcceleration`.
+
+### Esempio
+
+    var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
+    
+    // ... later on ...
+    
+    navigator.accelerometer.clearWatch(watchID);
+    
+
+## Accelerazione
+
+Contiene `Accelerometer` dati acquisiti in un punto specifico nel tempo. I valori di accelerazione includono l'effetto della gravità (9,81 m/s ^ 2), in modo che quando un dispositivo si trova piatta e rivolto in su, *x*, *y*, e *z* valori restituiti devono essere `` , `` , e`9.81`.
+
+### Proprietà
+
+*   **x**: quantità di accelerazione sull'asse x. (in m/s ^ 2) *(Numero)*
+*   **y**: quantità di accelerazione sull'asse y. (in m/s ^ 2) *(Numero)*
+*   **z**: quantità di accelerazione sull'asse z. (in m/s ^ 2) *(Numero)*
+*   **timestamp**: creazione timestamp in millisecondi. *(DOMTimeStamp)*
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/d656e018/doc/ko/index.md
----------------------------------------------------------------------
diff --git a/doc/ko/index.md b/doc/ko/index.md
new file mode 100644
index 0000000..aeeb005
--- /dev/null
+++ b/doc/ko/index.md
@@ -0,0 +1,146 @@
+<!---
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+# org.apache.cordova.device-motion
+
+이 플러그인 장치의 속도계에 대 한 액세스를 제공합니다. 가 속도계 3 차원 *x*, *y*및 *z* 축 따라 현재 장치 방향 기준으로 이동 (*델타*) 변경 내용을 감지 하는 모션 센서입니다.
+
+## 설치
+
+    cordova plugin add org.apache.cordova.device-motion
+    
+
+## 지원 되는 플랫폼
+
+*   아마존 화재 운영 체제
+*   안 드 로이드
+*   블랙베리 10
+*   Firefox 운영 체제
+*   iOS
+*   Tizen
+*   Windows Phone 7과 8
+*   윈도우 8
+
+## 메서드
+
+*   navigator.accelerometer.getCurrentAcceleration
+*   navigator.accelerometer.watchAcceleration
+*   navigator.accelerometer.clearWatch
+
+## 개체
+
+*   가속
+
+## navigator.accelerometer.getCurrentAcceleration
+
+*X*, *y*및 *z* 축 따라 현재 가속도 얻을.
+
+이 가속도 값에 반환 되는 `accelerometerSuccess` 콜백 함수.
+
+    navigator.accelerometer.getCurrentAcceleration(accelerometerSuccess, accelerometerError);
+    
+
+### 예를 들어
+
+    function onSuccess(acceleration) {
+        alert('Acceleration X: ' + acceleration.x + '\n' +
+              'Acceleration Y: ' + acceleration.y + '\n' +
+              'Acceleration Z: ' + acceleration.z + '\n' +
+              'Timestamp: '      + acceleration.timestamp + '\n');
+    };
+    
+    function onError() {
+        alert('onError!');
+    };
+    
+    navigator.accelerometer.getCurrentAcceleration(onSuccess, onError);
+    
+
+### iOS 단점
+
+*   iOS는 어떤 주어진된 시점에서 현재 가속도의 개념을 인식 하지 못합니다.
+
+*   가속을 감시 하며 데이터 캡처에 주어진 시간 간격.
+
+*   따라서,는 `getCurrentAcceleration` 에서 보고 된 마지막 값을 생성 하는 함수는 `watchAccelerometer` 전화.
+
+## navigator.accelerometer.watchAcceleration
+
+검색 장치의 현재 `Acceleration` 일반 간격에서 실행는 `accelerometerSuccess` 콜백 함수 때마다. 통해 밀리초 단위로 간격을 지정 된 `acceleratorOptions` 개체의 `frequency` 매개 변수.
+
+반환 된 ID 참조가 속도계의 시계 간격, 시청과 함께 사용할 수 있습니다 `navigator.accelerometer.clearWatch` 가 속도계를 보고 중지 합니다.
+
+    var watchID = navigator.accelerometer.watchAcceleration(accelerometerSuccess,
+                                                           accelerometerError,
+                                                           [accelerometerOptions]);
+    
+
+*   **accelerometerOptions**: 다음 선택적 키 개체: 
+    *   **주파수**: 검색 하는 `Acceleration` (밀리초)입니다. *(수)* (기본: 10000)
+
+### 예를 들어
+
+    function onSuccess(acceleration) {
+        alert('Acceleration X: ' + acceleration.x + '\n' +
+              'Acceleration Y: ' + acceleration.y + '\n' +
+              'Acceleration Z: ' + acceleration.z + '\n' +
+              'Timestamp: '      + acceleration.timestamp + '\n');
+    };
+    
+    function onError() {
+        alert('onError!');
+    };
+    
+    var options = { frequency: 3000 };  // Update every 3 seconds
+    
+    var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
+    
+
+### iOS 단점
+
+API 요청 간격 성공 콜백 함수를 호출 하지만 40ms 사이 장치에 요청의 범위를 제한 하 고 1000ms. 예를 들어 (3000ms) 3 초의 간격을 요청 하는 경우 API 마다 1 초 장치에서 데이터를 요청 하지만 성공 콜백을 3 초 마다 실행 됩니다.
+
+## navigator.accelerometer.clearWatch
+
+보고 중지는 `Acceleration` 에 의해 참조 되는 `watchID` 매개 변수.
+
+    navigator.accelerometer.clearWatch(watchID);
+    
+
+*   **watchID**: ID 반환`navigator.accelerometer.watchAcceleration`.
+
+### 예를 들어
+
+    var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
+    
+    // ... later on ...
+    
+    navigator.accelerometer.clearWatch(watchID);
+    
+
+## 가속
+
+포함 `Accelerometer` 특정 시점에 캡처된 데이터가. 가속도 값 포함 중력의 효과 (9.81 m/s ^2) 때 장치 거짓말 평평 하 고 *x*, *y*, 최대 직면 하 고 *z* 값 반환 되어야 합니다 있도록, `` , `` , 그리고`9.81`.
+
+### 속성
+
+*   **x**: x 축에 가속의 금액. (m/s에서 ^2) *(수)*
+*   **y**: y 축에 가속의 금액. (m/s에서 ^2) *(수)*
+*   **z**: z 축의 가속도의 금액. (m/s에서 ^2) *(수)*
+*   **타임 스탬프**: 생성 타임 스탬프 (밀리초)입니다. *(DOMTimeStamp)*
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/d656e018/doc/pl/index.md
----------------------------------------------------------------------
diff --git a/doc/pl/index.md b/doc/pl/index.md
new file mode 100644
index 0000000..c26d12e
--- /dev/null
+++ b/doc/pl/index.md
@@ -0,0 +1,146 @@
+<!---
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+# org.apache.cordova.device-motion
+
+Ten plugin umożliwia dostęp do urządzenia akcelerometr. Akcelerometr jest czujnik ruchu, który wykrywa zmiany (*delta*) w ruchu względem bieżącej orientacji urządzenia, w trzech wymiarach na osi *x*, *y*i *z* .
+
+## Instalacji
+
+    cordova plugin add org.apache.cordova.device-motion
+    
+
+## Obsługiwane platformy
+
+*   Amazon ogień OS
+*   Android
+*   Jeżyna 10
+*   Firefox OS
+*   iOS
+*   Tizen
+*   Windows Phone 7 i 8
+*   Windows 8
+
+## Metody
+
+*   navigator.accelerometer.getCurrentAcceleration
+*   navigator.accelerometer.watchAcceleration
+*   navigator.accelerometer.clearWatch
+
+## Obiekty
+
+*   Acceleration
+
+## navigator.accelerometer.getCurrentAcceleration
+
+Pobiera aktualne przyspieszenie wzdłuż osi *x*, *y* oraz *z*.
+
+Wartości przyspieszeń są zwracane funkcji `accelerometerSuccess`.
+
+    navigator.accelerometer.getCurrentAcceleration(accelerometerSuccess, accelerometerError);
+    
+
+### Przykład
+
+    function onSuccess(acceleration) {
+        alert('Acceleration X: ' + acceleration.x + '\n' +
+              'Acceleration Y: ' + acceleration.y + '\n' +
+              'Acceleration Z: ' + acceleration.z + '\n' +
+              'Timestamp: '      + acceleration.timestamp + '\n');
+    };
+    
+    function onError() {
+        alert('onError!');
+    };
+    
+    navigator.accelerometer.getCurrentAcceleration(onSuccess, onError);
+    
+
+### iOS dziwactwa
+
+*   iOS nie rozpoznaje koncepcji pobrania aktualnego przyspieszenia w danym punkcie.
+
+*   Musisz obserwować przyspieszenie i przejmować dane w określonych odstępach czasu.
+
+*   Podsumowując, funkcja `getCurrentAcceleration` zwraca ostatnią wartość zgłoszoną przez wywołanie `watchAccelerometer`.
+
+## navigator.accelerometer.watchAcceleration
+
+Pobiera urządzenie w bieżącym `Acceleration` w regularnych odstępach czasu, wykonywanie `accelerometerSuccess` funkcja wywołania zwrotnego za każdym razem. Określ interwał w milisekundach przez `acceleratorOptions` obiektu `frequency` parametr.
+
+Zwracane obejrzeć identyfikator odniesienia akcelerometr zegarek interwał i może być używany z `navigator.accelerometer.clearWatch` do zatrzymania, obejrzeniu akcelerometru.
+
+    var watchID = navigator.accelerometer.watchAcceleration(accelerometerSuccess,
+                                                           accelerometerError,
+                                                           [accelerometerOptions]);
+    
+
+*   **accelerometerOptions**: Obiekt z opcjonalnie następujące klucze: 
+    *   **frequency**: Jak często uzyskuje dane z `Acceleration` w milisekundach. *(Liczba)* (Domyślnie: 10000)
+
+### Przykład
+
+    function onSuccess(acceleration) {
+        alert('Acceleration X: ' + acceleration.x + '\n' +
+              'Acceleration Y: ' + acceleration.y + '\n' +
+              'Acceleration Z: ' + acceleration.z + '\n' +
+              'Timestamp: '      + acceleration.timestamp + '\n');
+    };
+    
+    function onError() {
+        alert('onError!');
+    };
+    
+    var options = { frequency: 3000 };  // Update every 3 seconds
+    
+    var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
+    
+
+### iOS dziwactwa
+
+API wywołuje funkcję zwrotną success w żądanym przedziale ale zakres żądania do urządzenia jest ograniczony przedziałem od 40ms do 1000ms. Dla przykładu, jeśli żądasz 3 sekundowy przedział (3000ms), API pobierze dane z urządzenia co 1 sekundę, ale wykona funkcję zwrotną success co każde 3 sekundy.
+
+## navigator.accelerometer.clearWatch
+
+Przestaje obserwować `Acceleration` odnoszące się do parametru `watchID`.
+
+    navigator.accelerometer.clearWatch(watchID);
+    
+
+*   **watchID**: Identyfikator zwrócony przez`navigator.accelerometer.watchAcceleration`.
+
+### Przykład
+
+    var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
+    
+    // ... later on ...
+    
+    navigator.accelerometer.clearWatch(watchID);
+    
+
+## Przyspieszenie
+
+Zawiera przechwycone w danej chwili dane z `akcelerometru`. Wartości przyśpieszenia to efekt grawitacji (9.81 m/s ^ 2), tak, że kiedy urządzenie znajduje się płaska i górę, *x*, *y*, i *z* wartości zwracane powinny być `` , `` , i`9.81`.
+
+### Właściwości
+
+*   **x**: Wielkość przyśpieszenia na osi x. (w m/s^2) *(Liczba)*
+*   **y**: Wielkość przyśpieszenia na osi y. (w m/s^2) *(Liczba)*
+*   **z**: Wielkość przyśpieszenia na osi z. (w m/s^2) *(Liczba)*
+*   **timestamp**: Znacznik czasu w milisekundach. *(DOMTimeStamp)*
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/d656e018/doc/zh/index.md
----------------------------------------------------------------------
diff --git a/doc/zh/index.md b/doc/zh/index.md
new file mode 100644
index 0000000..244e987
--- /dev/null
+++ b/doc/zh/index.md
@@ -0,0 +1,146 @@
+<!---
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+# org.apache.cordova.device-motion
+
+這個外掛程式提供了對設備的加速度計的訪問。 加速度計是動作感應器檢測到的更改 (*三角洲*) 在相對於當前的設備方向,在三個維度沿*x*、 *y*和*z*軸運動。
+
+## 安裝
+
+    cordova plugin add org.apache.cordova.device-motion
+    
+
+## 支援的平臺
+
+*   亞馬遜火 OS
+*   Android 系統
+*   黑莓 10
+*   火狐瀏覽器作業系統
+*   iOS
+*   Tizen
+*   Windows Phone 7 和 8
+*   Windows 8
+
+## 方法
+
+*   navigator.accelerometer.getCurrentAcceleration
+*   navigator.accelerometer.watchAcceleration
+*   navigator.accelerometer.clearWatch
+
+## 物件
+
+*   加速度
+
+## navigator.accelerometer.getCurrentAcceleration
+
+獲取當前加速沿*x*、 *y*和*z*軸。
+
+這些加速度值將返回到 `accelerometerSuccess` 回呼函數。
+
+    navigator.accelerometer.getCurrentAcceleration(accelerometerSuccess, accelerometerError);
+    
+
+### 示例
+
+    function onSuccess(acceleration) {
+        alert('Acceleration X: ' + acceleration.x + '\n' +
+              'Acceleration Y: ' + acceleration.y + '\n' +
+              'Acceleration Z: ' + acceleration.z + '\n' +
+              'Timestamp: '      + acceleration.timestamp + '\n');
+    };
+    
+    function onError() {
+        alert('onError!');
+    };
+    
+    navigator.accelerometer.getCurrentAcceleration(onSuccess, onError);
+    
+
+### iOS 的怪癖
+
+*   iOS 不會認識到在任何給定的點獲取當前加速度的概念。
+
+*   你必須看加速和捕獲的資料在特定的時間間隔。
+
+*   因此, `getCurrentAcceleration` 收益率從報告的最後一個值的函數 `watchAccelerometer` 調用。
+
+## navigator.accelerometer.watchAcceleration
+
+檢索該設備的當前 `Acceleration` 間隔時間定期,執行 `accelerometerSuccess` 回呼函數每次。 指定的時間間隔,以毫秒為單位通過 `acceleratorOptions` 物件的 `frequency` 參數。
+
+返回的觀看 ID 引用加速度計的手錶時間間隔,並可以用 `navigator.accelerometer.clearWatch` 來停止看加速度計。
+
+    var watchID = navigator.accelerometer.watchAcceleration(accelerometerSuccess,
+                                                           accelerometerError,
+                                                           [accelerometerOptions]);
+    
+
+*   **accelerometerOptions**: 具有以下可選的鍵的物件: 
+    *   **頻率**: 經常如何檢索 `Acceleration` 以毫秒為單位。*(人數)*(預設值: 10000)
+
+### 示例
+
+    function onSuccess(acceleration) {
+        alert('Acceleration X: ' + acceleration.x + '\n' +
+              'Acceleration Y: ' + acceleration.y + '\n' +
+              'Acceleration Z: ' + acceleration.z + '\n' +
+              'Timestamp: '      + acceleration.timestamp + '\n');
+    };
+    
+    function onError() {
+        alert('onError!');
+    };
+    
+    var options = { frequency: 3000 };  // Update every 3 seconds
+    
+    var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
+    
+
+### iOS 的怪癖
+
+API 呼叫成功的回呼函數的時間間隔的要求,但到 40ms年之間設備限制所請求的範圍和 1000ms。 例如,如果請求的時間間隔為 3 秒,(3000ms) API 請求資料從設備每隔 1 秒,但只有執行成功回檔每隔 3 秒。
+
+## navigator.accelerometer.clearWatch
+
+停止看 `Acceleration` 引用的 `watchID` 參數。
+
+    navigator.accelerometer.clearWatch(watchID);
+    
+
+*   **watchID**: 由返回的 ID`navigator.accelerometer.watchAcceleration`.
+
+### 示例
+
+    var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
+    
+    // ... later on ...
+    
+    navigator.accelerometer.clearWatch(watchID);
+    
+
+## 加速度
+
+包含 `Accelerometer` 在時間中的特定點捕獲的資料。 加速度值包括引力的影響 (9.81 m/s ^2),因此當設備謊言平面和麵朝上, *x*、 *y*,和*z*返回的值應該是 `` , `` ,和`9.81`.
+
+### 屬性
+
+*   **x**: 在 X 軸上的加速度量。(在 m/s ^2)*(人數)*
+*   **y**: 在 y 軸上的加速度量。(在 m/s ^2)*(人數)*
+*   **z**: 在 Z 軸上的加速度量。(在 m/s ^2)*(人數)*
+*   **時間戳記**: 創建時間戳記以毫秒為單位。*() DOMTimeStamp*
\ No newline at end of file