Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently installed a Compass app on my phone (it's a HTC Wildfire S if it matters) and I'm curious as how it works.

Found some answers online that the phone's hardware has a digital compass in it, is that it? or is it just a smart use of other sensors?

share|improve this question
up vote 6 down vote accepted

Yes, it has a magnetic sensor / digital compass.

share|improve this answer
Thanks Matthew. Found it in the specs: – user8932748 Dec 10 '11 at 18:43

Most Android Devices have a Geomagnetic Field Sensor built in. This sensor provides raw field strength data (in μT) for each of the three coordinate axes. You can also use theese values to program things like Metal Detectors.

I programmed one once, if you're interrested in source code let me know.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.