Smartphone communication using magnetic fields