Revision: 52886
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at November 4, 2011 02:42 by parkerkrhoyt
Initial Code
var latest = null; function doDeviceReady() { var options = { frequency: FREQUENCY_ACCEL }; watchID = navigator.accelerometer.watchAcceleration( doAcceleration, doError, options ); } function doAcceleration( acceleration ) { latest = { x: acceleration.x, y: acceleration.y }; } function doError() { alert( 'Acceleration Error' ); }
Initial URL
Initial Description
Initial Title
Using the Accelerometer with PhoneGap
Initial Tags
javascript, phone, mobile, web
Initial Language
JavaScript