title: device orientation problem in HTML 5 on Android
body: <p>I have the below code to check for device orientation and device motion handling in HTML 5. I got this from <a href="http://dev.w3.org/geo/api/spec-source-orientation.html" rel="nofollow">http://dev.w3.org/geo/api/spec-source-orientation.html</a>. I tested my code using iPhone3G and the motion event was trapped. I dont know why the device orientation was not trapped. I believe since iPhone3G does not have Compass support I could not trap <strong>'compassneedscalibration'</strong> event. </p>
  
  <p>I tested the App in Android's browser. (HTC Wildfire). I could not get any of the events. Please share your why we dont get the events in Android Mobile?</p>
  
  <pre><code> window.addEventListener("compassneedscalibration", function(event) {
                    alert('Your compass needs calibrating! Wave your device in a figure-eight motion');
                    event.preventDefault();
  
  
       }, true);
  
      window.addEventListener("deviceorientation", function(event) {
                    // process event.alpha, event.beta and event.gamma
                    alert("deviceorientation");
      }, true);
  
      window.addEventListener("devicemotion", function(event) {
                    // Process event.acceleration, event.accelerationIncludingGravity,
                    // event.rotationRate and event.interval
                     alert("devicemotion");
      }, true);
  </code></pre>
  
  <p><strong>UPDATE 1</strong></p>
  
  <p>One thing I have notice while testing in iPhone and iPad is that whether the device moves or not the event kept getting triggered continuously with out any stop.</p>
  
  <p><strong>UPDATE 2</strong></p>
  
  <p>I found the reason behind the question I put up in <strong>UPDATE 1</strong>. It seems that The API detects and delivers accelerometer data 50 times per second. </p>