One of the more timely WWDC announcements was Apple Watch handwashing detection. The coronavirus crisis means everyone is being encouraged to wash their hands more frequently, and to ensure that we’re doing so thoroughly.

But the handwashing detection feature wasn’t developed hastily in response, says Apple, but was rather years in development …

WHO and CDC guidelines recommend handwashing for at least 20 seconds, and watchOS 7 aims to automatically detect when you’re washing your hands, and to start a 20-second countdown timer with a cute animation. If it detects that you have stopped washing your hands before the time is up, it politely prompts you to keep going.

A TechCrunch report says that it took literally years of work.

The Health app on iPhone will show frequency and duration of the user’s handwashing, as well as information on the importance of handwashing, as it relates to overall health. Sounds used to detect handwashing are not automatically recorded or saved by the Health app or Apple Watch.

Once automatically detected, handwashing will begin a 20-second timer.

The Apple Watch handwashing feature relies on three cues.

Unlike other rush initiatives undertaken by the company once the virus hit, however, the forthcoming Apple Watch handwashing app wasn’t built overnight. The feature was the result of ‘years of work,’ VP of technology Kevin Lynch told TechCrunch. In typical Apple fashion, the product was a result of years of trial and error, according to the executive.

Along with motion, the app listens for the sound of running water. Even that’s not enough, though — after all, eco sinks have become increasingly popular, meaning that there’s often less water sound to be listening for.

The sound of squishing soap takes care of that last bit. It’s got a unique enough audio signature so as to confirm that handwashing is taking place.

Could the Apple Watch go further, and help diagnose COVID-19? Apple says it is not doing any of its own research in this area, but is supporting those who are.

On the Watch front specifically, it has opened remote usage for doctors looking to monitor patients’ ECG readings without risking exposure to the virus for either party. Apple currently makes no claims about the Watch’s potential for helping to diagnose the virus, however. ‘While we haven’t studied specifically how Apple Watch can track COVID, we’re happy to support the research the medical community is doing. We really support their initiatives by enabling our colleagues in the space, and we’re excited to see what they learn,’ Apple’s VP of Health, Sumbul Ahmad Desai, tells TechCrunch.