How to detect a magnetic field from a distance?
The problem is, say you have a N42 magnet cube of 5x5mm with 1.3T strength, at 150mm (6") the magnetic field is 1.5 microTesla. Which is not a lot. Even the magnetic field of the planet is more at ~50 microTesla.
See here: https://www.kjmagnetics.com/calculator.asp?calcType=block

So, I suspect you'd need to be looking into using a compass and detect disturbances with that. Since hall sensors are typically milliTesla range.

You phone has one. See if you can use it to test sensitivity.