The Google Picker API

 

Users have content across many Google properties: YouTube, Picasa Web Albums, Google Docs, and more. Now we have a common interface for your users to select Google content. The Google Picker API provides a familiar-looking dialog box that’s easy for you to integrate into your apps. Your users can quickly browse their own content without ever leaving your page or app.

Perhaps you’re developing a blogging platform and you want your users to be able to embed their Picasa Web Albums photos. You can even let your users pick from public content, as found from image and video search.

Once the Picker is invoked by your user, a modal dialog appears on the page. If the user is already signed in to their Google account, they’ll see their content in just a second or two. If not, the user will be asked to sign in.

Integrating with the Google Picker API is straightforward. First, you specify which Google services should show up as options in the Picker navigation. For example, if you’re a photo site, you may choose to show Picasa and Google Image Search, but hide Google Docs and other services. Then, you simply specify a callback function that will be called as soon as the user’s data is returned to your application.

var picker = new google.picker.PickerBuilder().
    addView(google.picker.ViewId.IMAGE_SEARCH).
    setCallback(pickerCallback).
    build();
picker.setVisible(true);

You can find more integration details and examples in the documentation. We hope you enjoy this new API!

Convert SWF files to HTML5 with Swiffy

Some Google projects really do start from one person hacking around. Last summer, an engineering intern named Pieter Senster joined the mobile advertising team to explore how we could display Flash animations on devices that don’t support Adobe Flash player. Pieter made such great progress that Google hired him full time and formed a team to work on the project. Swiffy was born!

Today we’re making the first version of Swiffy available on Google Labs. You can upload a SWF file, and Swiffy will produce an HTML5 version which will run in modern browsers with a high level of SVG support such as Chrome and Safari. It’s still an early version, so it won’t convert all Flash content, but it already works well on ads and animations. We have some examples of converted SWF files if you want to see it in action.
 


 
Swiffy uses a compact JSON representation of the animation, which is rendered using SVG and a bit of HTML5 and CSS3. ActionScript 2.0 is also present in the JSON object, and is interpreted in JavaScript in the browser. This representation makes the Swiffy animations almost as compact as the original SWF files.

Swiffy is a great example of how far the web platform has come. Swiffy animations benefit from the recent advancements in JavaScript execution speed and hardware accelerated 2D graphics in the browser.

Google +1 in API docs

Sometimes it’s hard to find the right doc at the right time. Lots of web pages mention the terms you’re looking for, but which ones actually have them in the right context? We ask our friends and coworkers these questions because we bet they’ve seen the problem before. We trust their technical judgment and we know they can skip straight to the right answer.

That’s why we’ve just added the +1 button to the top of most code.google.com API docs:



Whenever you find the key information you need, we hope you’ll +1 that page and let the world know! It’s a simple way to help point the people you code with in the right direction and make RTFM’ing a bit easier for everyone.