The suspicions of many in the iPhone developer community have been confirmed by Google. A spokesman for the company told CNet yesterday that its latest update to Google Mobile does indeed make use of an undocumented API in order to read the proximity sensor in the iPhone, which allows it activate its voice search function when a user is ready to speak.

The new voice search feature of Google Mobile caught a lot of attention for its interesting ability to activate voice search when appropriate. You can simply lift the iPhone to you head, as if taking a call, and speak—the iPhone's proximity sensor lets the app know that it's time to start taking voice commands. The only problem is that, as far as anyone knew, there was no official API in the iPhone SDK that allowed access the iPhone's proximity sensor. After some digging, Erica Sadun determined that Google was using an undocumented, but not unknown, method to find out when the proximity sensor is activated.

Though Google admits it is using an undocumented API, the spokesman adamantly denied using any private frameworks. Google took a risk, the same one any developer using undocumented APIs does; it was hoping that Apple would (a) not reject the app for violating the iPhone SDK agreement, and (b) not later change the API to access the sensor. If Apple rescinds its approval or changes the API, it would force Google to change their code or perhaps even change the UI to avoid using the proximity sensor.

And it's not the first time Google has taken a chance in using undocumented APIs. Analysis of the code for its open-source Chrome browser shows that it specifically calls undocumented APIs in certain versions of Windows in order to provide greater security against malicious websites. Finding these undocumented APIs actually appears to require some reverse engineering of Windows itself. Doing so is expressly verboten under the Windows EULA. However, it's clear that Google's goal—greater security than the documented APIs allows—is worth the risk.

Just as with Chrome, there may be an upside to Google Mobile using the undocumented API; Apple may either document the current API, or make some kind of official API available to developers in an upcoming SDK update. And the benefits to users are clear: the UI is innovative and intuitive—just the sort of thing Apple was hoping developers would bring to the platform.