How do iPads detect when a cover closes?

Some iPad cases (particularly those that look like book covers) provide a feature that when the cover closes the iPad enters suspended mode and when the cover opens the iPad wakes up. The one provided by the link claims it provides this functionality through a magnetic strip. Does this mean iPads have the ability to sense nearby magnetic fields built in? Why and how does this work?

PS. It appears Apple's Smart Covers provide this functionality too.


Solution 1:

The Smart Cover has a magnet that interacts with the sleep sensor of an iPad. So whenever you close the Smart Cover, iPad will know when to sleep. The same theory for waking up.

Info from MacRumors

Solution 2:

Magnetic Auto sleep/wake function is mainly used in electronic device cases, such as Kindles, iPods and so on... To make this easier to understand, let's focus on an iPad. For this to work, the device cover needs to be held on to the iPad with magnets. These magnets don't just keep the iPad case on but it also aligns the magnets with the ones inside the iPad. There are 21 magnets in the case and 10 magnets in this device itself. Some of those magnets are used to hold the case on, whilst others are used to activate the "sleep sensor" which you can find on the right hand side of the iPad. It was also found out that the device does not need to be woken up by 31 magnets, but can be woken up by a single 'magnetic pickup stick'. This is because to wake the device up, or put it to sleep, all you need to do is activate the sleep sensor.