with phonegap and accelerometer