iPhone Hacks

November 2009

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          

Disclaimer

  • This website is not owned by, is not licensed by nor is a subsidiary of Apple Computer, Inc. Apple iPhone are trademarks of Apple Computer, Inc., registered in the U.S. and other countries. The content of this website is not supplied or reviewed by Apple Computer, Inc. All articles, images, logos and trademarks in this site are property of their respective owners. Please follow this link to read the complete disclaimer.

Blog Stats

  •   
    Top Blog Topsites List
    Gadget Blogs - BlogCatalog Blog Directory
    Technology
    Technology Blogs - Blog Top Sites
    DigNow.org
    Find the best blogs at Blogs.com.

Google's Mobile App Uses Undocumented API's to use iPhone's Proximity Sensor to Prompt a Voice Search

Google's Voice App for the iPhone

The new version of Google's Mobile App for the iPhone which introduced voice search recently has run into some controversy.

John Gruber of Daring Fireball had done some research and has discovered that Google Engineers have actually used unpublished API's that officially break Apple's iPhone SDK agreement.

Goolge spokesperson has also confirmed that they are using undocumented APIs in order to use the iPhone’s proximity sensor to prompt a verbal search.

If you have used Google's Mobile app, you might have noticed that you have the option to either tap an on-screen button to initiate voice search or you can initiate it by simply bringing your iPhone to your ear which gives the iPhone app a nice touch.

Gruber points out:

In order to trigger this automatic voice prompt, you must:

  1. Move the iPhone.
  2. Trigger the proximity sensor next to the speaker at the top of the iPhone.

You need to do both, in that order. The voice prompt is never triggered by motion alone, nor by covering the proximity sensor without first having moved the phone. The only way it is triggered is by moving the phone and then triggering the proximity sensor.

However, as per iPhone SDK's documentation, the only thing iPhone apps can do with the proximity sensors is to turn it on and off. When the proximity sensor is on, the screen is off and when the sensor is off, the screen is on. It also stops accepting touch input when you cover the sensor. You might have noticed this in quite a few iPhone apps like Fring which allow you to make VOIP calls from your iPhone over Wi-Fi.

So an iPhone app can check the status of this sensor and also toggle it but there is no way for the iPhone app to be notified when the sensor is triggered, at least there are no published API's available to replicate this behavior.

So based on his research Gruber concluded that Google had used an undocumented API in the latest version of its Mobile app.

Gruber was spot on as Cnet later reported:

"A Google spokesman confirmed Tuesday that Google Mobile uses undocumented APIs (application programming interfaces) in order to use the iPhone's proximity sensor to prompt a verbal search. iPhone developers were only supposed to use the APIs that Apple published in its SDK when they create their applications under the terms of that agreement.

Google has denied, however, a more serious charge that it was linking to private or dynamic frameworks in the Google Mobile application. That's considered a big no-no in the development community." 

The problem with using undocumented API is that the next firmware update could break the iPhone app if Apple decides to make some changes to the API.

It could also mean that Apple rejects or removes the iPhone App from the App Store like they have done in case of quite a few apps thus forcing Google to modify the functionality of its iPhone app.

I think the fair thing to do would be to publish the API that is being used by Google for its Mobile app so that other iPhone developers can also use it as it definitely enhances the user experience of Google's app.

Tell us what you think in the comments.

[via Daring Fireball, Cnet]

Follow this blog

 

Top iPhone Hacks Categories:

Hacks
iPhone Applications
Unlock iPhone
JailBreak iPhone
iPhone Tips & Tricks
iPhone Games
iPhone News 

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

SUPPORT OUR SPONSORS

Subscribe to RSS Feed

Follow us on Twitter