Yesterday, we released Evernote Peek, the world’s first app that’s controlled using the iPad 2 Smart Cover. We aren’t letting ourselves submit entries into the Evernote Developer Competition (pay yourself first?), but Peek is an excellent example of the type of app that we’re looking for. It’s an easy-to-use application that provides users with a new and entertaining way to interact with their Evernote notes, and it works perfectly with our motto Remember Everything. Think about what makes Peek compelling as you plan your entry for the competition.
This is the tech blog, so I’d like to share a quick explanation of how Peek works. We’ll try to make a habit out of this, sharing interesting tidbits with you as we release apps and explore new platforms.
One of the features of the Smart Cover is that it can automatically put your iPad 2 to sleep when you close it, then wake the device up when you open it. This makes the innovative “Smart Cover-as-a-controller” part of Peek pretty simple. We simply took advantage of two methods from the UIApplicationDelegate protocol: applicationWillResignActive and applicationDidBecomeActive. As the names imply, applicationWillResignActive is invoked when you close the Smart Cover, and applicationWillBecomeActive is invoked when you open the Smart Cover.
When you close the Smart Cover and the app is about to resign its active state, the applicationWillResignActive delegate sends a notification to our view controller to advance to the next clue. When you open the cover, the applicationWillBecomeActive delegate sends a notification and the page-turning sound is played.
You’ve probably already identified one issue with the way that Peek works: we’re not explicitly detecting that the Smart Cover was opened or closed (there’s no public API for that), so you can mimic the open-close action by simply switching apps. This actually came in handy during testing, when we were able to quickly advance through a notebook by repeatedly double-tapping the iPad’s Home button. The solution also doesn’t work if you turn off Cover Lock / Unlock or if you have a passcode set. Finally, a partially-closed Smart Cover tends to confuse the iPad’s light sensor, so you sometimes have to adjust your device’s brightness settings to make Peek easy to read.
As I said, it was pretty simple to implement the Smart Cover functionality in Peek. Steve, our lead iOS engineer, was able to put together a proof of concept in under an hour. What wasn’t so easy was getting the look and feel of the app just right. For that, we turned to Gabe, Evernote’s lead designer, and Juan and Carlos at MindsMomentum, a team of iOS developers and designers in Puerto Rico who have worked with the Evernote platform before. In just four weeks they built Peek from the ground up, including all of the visual design and Evernote syncing. Thanks, guys!