You have to go back.
Most phones have the proper sensor, really, but the accuracy and longevity of a 1/2 cent chinky made sensor is what?
Magnetometer specifically, phones do have them and a few more… never have found a good explanation for that.
Right, you are not going to get say, a capacitance measurement from air, but why the hell would a phone need magnometer??