If you were distracted by all the skydiving and BMX stunts at Google I/O, you may have missed a new YouTube API for Android, announced by Ross McIlroy and Anton Hansson. Set to be made public in the coming months, the API solves a common problem for Android developers, allowing YouTube video content to be embedded seamlessly in native apps.
Currently, developers are limited to either embedding video as Flash content, which limits access to the API, or as an iframe in a webview, which Android Central points out is "un-supported on older versions of Android." A workaround involves redirecting users to Google's native YouTube app, but this disrupts the user experience.
The basic code for accessing the new API runs to just three lines, with the new embedded video capable of playing on all Android versions from 2.2 on. It will also support ads and monetization, helping developers with premium video content to generate a few extra dollars from their apps.