I downloaded Compass program for Android and tried to bring strong magnet close to it. The pointed remained stable, as if there was no magnet nearby.

Here is the video proof on YouTube.

I have checked other devices, including iPad Air 2 and they showed similar behavior. This is drastically differs from conventional compass behavior. Also, neither device show correct cardinal directions, except conventional compass.

Why doesn't Android compass react to magnet?


Note, that magnetic field value definitely increasing when magnet is approaching.

So, the actual question is how do they try to distinguish between Earth magnetic field and magnet's magnetic field?

Also, note, that direction shown by compass is INCORRECT relatively to conventional compass.

  • 3
    Great question! I've never considered or looked into it. My "guess" is there is no compass, just accelerometers and gyroscope and GPS and it uses a combination of those that are not succeptable to nearby magnetism
    – Baronz
    Apr 24, 2016 at 23:06
  • 1
    I'm leaning towards you need to leave the magnet in place for a while before the digital compass starts showing the effect. The digital compass in a device is quite noisy so developers tend to smooth out the data to make it less jittery (and look pretty). The immediate results of a physical compass aren't the same as what the developer did in software. Also digital compass has a field strength limit, rare-earth magnets may peg the sensor at the max which may trigger software to ignore as it is in a extreme state. Apr 25, 2016 at 6:09
  • Interesting question. While I was researching about this, I stumbled upon a discussion on Quora where it explains how Android compass works using earth magnetic field. However, I can't take any conclusion whether it's stronger/weaker than magnetic field around magnet stone, or whether it affects anything.
    – Andrew T.
    Apr 25, 2016 at 6:20
  • Incomplete question, we need to know which phone and which compass app. Probably you had a low end phone which doesn't have a built in magnetometer. Other factors around how the app calculates direction from the 3 axes of the sensor and also the automatic calibration of the phone. Best way to measure fields rahter than find direction is use something like 'Sensor Logger' by irealitysoft which shows all 3 axes against time. May 7, 2018 at 6:53

4 Answers 4


The sensor algorithm people worked hard to make sure that the "compass sensor" is not affected by stray ambient magnetic field. If you want to see magnetic field data, use the magnetic field sensor instead.

The common way to know that the device is subjected to an external magnetic disturbance is by comparing the magnetic sensor data with motion sensors (accelerometer and more importantly the gyroscope), if there is no motion, the algorithm will suppress any change to compass heading, because it is trying to reflect reality that compass heading did not change. For more details, look under the subject of "sensor fusion."

  • 1
    Oh, any by the way, GPS does NOT show heading (perhaps the bearing of a movement trajectory) but not which way the device is pointing. Any answer involving GPS is simply wrong.
    – Ian
    May 2, 2016 at 19:12
  • Please link sources for "sensor fusion" to enhance value of your answer +1
    – beeshyams
    May 3, 2016 at 9:34

Many android phones have a magnetometer, which measure magnetic field in microtesla. e.g. Samsung S6 has a yamaha chip which can measure up to 2000uT. If you want to see the effect of magnets and electromagnetism install an app like sensor logger by iReality soft or 'gaussmeter'.


In my tests the magnet did affect the compass on the Galaxy S2 Active. I could drag North right round 360 degrees.


Android compass works using phones sensors and gps not magnet or any kind of compass integered inside your phone. So, it is not possible to make any kind of deflection using magnets.

  • this answer is only correct for low spec phones which don't have an actual magnetometer and rely on other sensors like GPS. If you run the irealitysoft app 'Sensory Logger' you can detect the field from magnets like the clasp on a wallet style phone case. I've tried this on an S6 and M4 it definitely works. May 7, 2018 at 6:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .