Developers can make use of the accelerometer sensor and continual updates provided by it for many purposes, including motion-detection games and updating the position of an object on the screen.
We will use the device's accelerometer sensor on continual update to move an element around the screen as a response to device movement:
accelobjectby running the following command:
phonegap create accelobject com.myapp.accelobject accelobject
cordova platform add ios cordova platform add android