Add the magnetic field sensor listener