0.1.4 • Published 10 years ago
cordova-plugin-gyroscope v0.1.4
Cordova Gyroscope Plugin
Description
This project's idea is inspired from these two projects.
This project is merged by those two projects, and also provided an Angular module
called deviceGyroscope.
Installation
cordova plugin add cordova-plugin-gyroscope@0.1.4Usage
API
var gyroscope = navigator.gyroscope;
gyroscope.getCurrent
gyroscope.watch
gyroscope.clearWatchFor Angular
- Copy
deviceGyroscope.jsto your project folder. - Add
deviceGyroscopeas a module.
angular
.module(
'app', [
... other modules
'deviceGyroscope'
]
)- Inject
$deviceGyroscopein controller. It's return a promise.
$deviceGyroscope.getCurrent()
$deviceGyroscope.watch()
$deviceGyroscope.clearWatch()