I looked at your source code at:
https://github.com/charlieroberts/Control/blob/master/Android/Sample/assets/www/index.html
and it loads up PhoneGap from:
but that version of PhoneGap is for the iPhone. That is most probably
the reason why you code is not working on Android. There is a
different version of phonegap.js built for each platform.
Simon Mac Donald
http://hi.im/simonmacdonald
> --
> You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
>
> For more info on PhoneGap or to download the code go to www.phonegap.com
>
You aren't really using PhoneGap correctly. You'll need to setup an
application using PhoneGap in order to access the accelerometer. See:
http://www.phonegap.com/start/#android
for info on getting started.
The reason the geolocation is working for you is that it is built into
the web browser on Android on any 2.X or better device.
Simon Mac Donald
http://hi.im/simonmacdonald
The web browser from Android does not have access to accelerometer functions.
Simon Mac Donald
http://hi.im/simonmacdonald
http://developer.android.com/guide/developing/devices/emulator.html
Simon Mac Donald
http://hi.im/simonmacdonald
Install the sample application from PhoneGap, it show the access to accelerometer via the HTML/JS but is accessed natively from PhoneGap, as Simon answered, from the Android webbrowser, you cannot access accelerometer.regards