Monday, December 3, 2012

New Google Maps Android API now part of Google Play services

Posted by Reto Meier, Evan Rapoport, and Andrew Foster



Google Play services is our new platform that offers you better integration with Google products, and which provides greater agility for quickly rolling out new capabilities for you to use within your apps. Today we’re launching Google Play services v2.0, which includes two new APIs, including perhaps our most frequently requested upgrade: Maps.



Google Maps Android API



The new version of the API allows developers to bring many of the recent features of Google Maps for Android to your Android apps. We’re excited to make this API available as part of Google Play services supporting devices from Froyo onwards (API level 8+).



The new API uses vector-based maps that support 2D and 3D views, and allow users to tilt and rotate the map with simple gestures. Along with the layers you’ve come to know from Google Maps such as satellite, hybrid, terrain and traffic, the new API lets you include indoor maps for many major airports and shopping centers in your app.



One of most common feature requests we’ve heard on Android is support for Map Fragments. With this new API, adding a map to your Activity is as simple as:



<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.MapFragment" />


Check out this image from updated Trulia Android app (which goes live tomorrow), that users can use to search for a place to buy or rent in 3D.





The new API is simpler to use, so that creating markers and info windows is easy. Polylines, Polygons, Ground Overlays and Tile Overlays can all now be added to the map with just a few lines of code.



To get started follow the getting started instructions to obtain an API Key. Then download and configure the Google Play services SDK using the SDK Manager. Check the Google Maps for Android API documentation for more details. If you haven't got it already, you'll need to download the Android SDK first.



More than 800,000 sites around the world already use our mapping APIs to create amazing and useful apps. We hope you enjoy using this new addition to the Google Maps API family, and building mapping experiences that were never before possible on a mobile device.



Photo Sphere



In Android 4.2, we introduced Photo Sphere mode in the Camera, which you can use to create amazing, immersive panoramas just like you see in Street View on Google Maps. Today we’re excited to announce new APIs and documentation that empower developers, businesses, and photographers to explore new uses of Photo Sphere for work and for play.



We’ve made Photo Sphere an open format so anyone can create and view them on the web or on mobile devices.



A Photo sphere is simply an image file (like a JPG) that has in it text-based metadata, an open format created by Adobe called XMP. The metadata describes the Photo Sphere’s dimensions and how it should be rendered within the interactive Photo Sphere viewer you see in Android, Google+, and Google Maps.



If you’d like to programmatically or manually add the XMP metadata into panoramic images not created by the Photo Sphere camera in Android, stay tuned today for more details on the metadata and how to apply it to your photos programmatically later.



In the new Google Play services, we’ve added APIs to give you the ability to check whether an image is a Photo Sphere and then open it up in the Photo Sphere viewer.



// This listener will be called with information about the given panorama.
OnPanoramaInfoLoadedListener infoLoadedListener =
new OnPanoramaInfoLoadedListener() {
@Override
public void onPanoramaInfoLoaded(ConnectionResult result,
Intent viewerIntent) {
if (result.isSuccess()) {
// If the intent is not null, the image can be shown as a
// panorama.
if (viewerIntent != null) {
// Use the given intent to start the panorama viewer.
startActivity(viewerIntent);
}
}

// If viewerIntent is null, the image is not a viewable panorama.
}
};

// Create client instance and connect to it.
PanoramaClient client = ...
...

// Once connected to the client, initiate the asynchronous check on whether
// the image is a viewable panorama.
client.loadPanoramaInfo(infoLoadedListener, panoramaUri);

To learn more about Google Play services and the APIs available to you through it, visit the new Google Services area of the Android Developers site.

Wednesday, November 28, 2012

YouTube's New Interface, Closer to Launch

YouTube continues to test new user interfaces, but it looks like one of these versions will be finally rolled out to everyone.

There's a new message on the experimental homepage that welcomes users to the new YouTube and explains one of the new features: "What to watch shows you new activity from your subscriptions, recommendations based on videos you've watched and your taste in videos, plus the most popular videos on YouTube". YouTube also links to a page that was used the last time when YouTube was redesigned. You can see the old page in Google's cache, but now the page returns a 404 error message.


YouTube has constantly tested new versions of the sidebar from video pages. This time there's a new sidebar section that shows other related videos. You can "get the search results, feeds, and channel videos you were just looking at". For example, you can perform a search, click one of the results and see the list of results by clicking "more results" in the sidebar, instead of going back to the search results page.

The sidebar is the most important thing about the new YouTube interface because it's always there: on the homepage, the settings page, the search results page and can be expanded when you watch videos.


To try the new YouTube interface, check the instructions from this post.

Google Shows Flight Notifications

Back in August, Google released an experiment that integrated Google Search with Gmail. Besides returning results from Gmail, Google also detects flight-related confirmation messages so that it can show additional information for your upcoming flights. You can try this feature by searching for [my flights], as documented here.


What Google doesn't mention is that it also shows flight notifications. They look just like the Google+ birthday reminders.


Flight notifications aren't a new feature (someone spotted it in September), but I thought it's worth mentioning it. There's a lot of valuable information that can be obtained from Gmail messages, as you can see from the latest Google Now update, which shows cards for flights, packages, hotel reservations, event bookings and more. Maybe Google Now will have a desktop interface and it will replace some of the iGoogle features.

{ Thanks, Matt. }

Edit spreadsheets on the go with the Drive mobile app

You’re making your list, you’re checking it twice -- and now you can do it from anywhere.

Just in time for this year’s holiday season, you can edit Google Sheets on your mobile device, just like you can with Google Docs. From the Drive app on your Android device, you can create a new spreadsheet or edit an existing one. You can switch fonts, resize columns, sort data, and more. And just like on your computer, you’ll be able to see other people’s edits in real time as they’re made.


Beyond spreadsheets, you may notice a few other tweaks to the Drive app, including better text formatting when you paste from one Google document to another. And from your Android device, you can edit text within tables in documents and add a shortcut on the homescreen of your device to any specific file in Drive.

Whether it’s holiday recipes, shopping lists, or just your family budget, the Drive app on your mobile device makes it easy to get stuff done wherever you are.

Get the Google Drive app today on Google Play.

Posted by Shrikant Shanbhag, Software Engineer

Tuesday, November 27, 2012

Replace Gmail Attachments With Google Drive Files

I was complaining in a recent post that Gmail doesn't properly integrate with Google Drive and doesn't let you upload files to Google Drive instead of sending attachments. The new compose interface added this feature and you can now click "insert files using Drive", upload a file or select an existing one.


It's still not a seamless experience, you have to click a separate button and deal with permission issues, but it encourages users to upload files to Google Drive and use the Google Drive apps. Gmail tries to solve permission issues by prompting with the option to change sharing settings.

Why would you upload files to Google Drive instead of using attachments? You can send bigger files (10 GB files vs 25 MB attachments), you can edit documents collaboratively, write comments, upload new versions of the files and manage revisions, you can delete the file or change permissions.

Unfortunately, when you send links to Google Drive files, it's more difficult to download the files and you can no longer download them with one click.

There's another problem: Gmail offers 10 GB of free storage, while Google Drive offers 5 GB of free storage, excluding Google Docs/Sheets/Slides files. More free storage would make GDrive more attractive.

Google says that GDrive integration is "rolling out over the next few days and is only available with Gmail's new compose experience".

{ via Gmail Blog }

Monday, November 26, 2012

Designing for Tablets? We’re Here to Help!

Posted by Roman Nurik, who often writes about Android design-related topics on Google+

So you’ve got a great Android phone app on Google Play, your users love it, and you’re kicking back and watching the download numbers soar. Congrats! But like any enterprising developer, you may be thinking, “how do I take my app’s success even further?” The answer: an equally awesome experience on tablets. Users love their tablet apps! For example, Mint.com found that the larger screen real estate allowed tablet users to engage with their budget data 7x more than on phones. And TinyCo found that on average, paying users spent 35% more on tablets than on handsets. So now is the right time to think about how your app translates onto these larger screen devices that are designed to meet users’ more generic, everyday computing needs.

In this post, we’ll recap some of the resources available for crafting a great tablet experience for your users. These resources are useful for everyone in the app development pipeline—from product managers, to designers, to developers, and QA engineers.

Android Design Guidelines

No conversation about Android app design or development should go very far without first consulting the Android Design guidelines. While most of the sections are relevant to all Android devices, certain sections stand out as particularly relevant to design on tablets.

The Devices and Displays page introduces the concept of density-independence. For example, although the Nexus 4, Nexus 7, and Motorola XOOM all have a similar pixel resolution (1280x768, 1280x800, and 1280x800 respectively), they have vastly different screens. Instead of thinking in pixels, think in dips (density-independent pixels)—that way, it’s much easier to conceptualize the difference between Nexus 4 (640x384 dp), Nexus 7 (960x600dp), and Nexus 10 or the Motorola XOOM (1280x800 dp).

Following the 48dp rhythm discussed in Metrics and Grids helps take some of the guesswork out of sizing elements, especially for tablets. When in doubt, use multiples of 48dp (or 16dp for a finer grid) for sizing elements horizontally and vertically. For example, when showing sparse content on larger screens, consider using generous side margins of 96dp or 144dp. Or when deciding how wide your master pane should be in a master/detail layout for 10” tablets, see how your master content looks and feels with a width of 240dp or 288dp.

The Multi-pane Layouts guide discusses use cases and examples for combining related views into a single screen to simultaneously improve app navigation and make optimal use of the available screen real estate. It also discusses strategies for laying out content across both portrait and landscape, all while maintaining functional parity across orientations. Since users enjoy using tablets in both portrait and landscape orientations, it’s even more important to react properly to orientation changes than with phones.

Lastly, the Downloadable Stencils offer designers a great starting point for high-fidelity mockups, complete with reference device outlines, correctly sized action bars, and more.

Android Training for Developers

The Training section of the developer site offers task-oriented technical training material, complete with flow diagrams, code snippets, sample projects and more. Several of these ‘classes’ are geared toward helping developers understand how to scale your apps across any screen size.

The Designing Effective Navigation class—aimed more at the initial design phase of the app creation process—offers a methodology for effectively planning and grouping screens on tablets, and even shows example wireframes for a simple news reader application following this methodology.

The classes Building a Dynamic UI with Fragments and Designing for Multiple Screens demonstrate how to use fragments in conjunction with Android’s resources framework. They show how to easily choose between tablet and handset layouts at runtime while maximizing code reuse and minimizing your application size using resource aliases. They also demonstrate techniques for adapting UI flows based on the current layout.

Lastly, while not precisely a training class, the Supporting Tablets and Handsets document offers even more information about some of these key best practices. And if you’re the type of developer that would prefer to skip the text and jump right into the code, you can even add a Master/Detail flow, complete with handset and tablet support, to your app with just a few clicks using the Android Developer Tools for Eclipse.

Android Design in Action Highlights

Each week, a few of us on the developer relations team get together on the Android Design in Action live show to discuss Android design best practices, as well as provide original ‘redesign’ mockups to help demonstrate our vision of how Android apps should look and feel.

A recent episode focused on the topic of responsive design, or designing flexible apps that can adapt to whatever screen size or form factor they’re run on:

In the episode, we celebrated successful examples of responsive design on Android, ranging from creating calendar events in Google Calendar, to browsing wallpapers and stories in Pattrn and Pocket, to playing video in TED, and finally to managing your conference schedule in the open-source Google I/O 2012 app.

We also regularly feature tablet design concepts on the show (some are shown below), so we highly recommend tuning in each week for design ideas.

 

For even more tablet app inspiration, check out a few of these apps: Expedia Hotels & Flights, Pulse News, SeriesGuide, Tasks and Timer.

The Tablet Quality Checklist

Over in the “Distribute” section of developer.android.com, the recently published Tablet App Quality checklist is a great way to check if your app is tablet-ready along a variety of technical dimensions. You should make sure that everyone involved in your mobile products is aware of  the standards defined in this checklist, as it is one of the ways in which the Google Play team selects apps to feature in the Staff Picks for Tablets collection.

So What are You Waiting For?

It's been an exciting year for Android tablets. Make sure your app is positioned to succeed in the evolving device landscape by following some of the best practices and examples discussed here and on the rest of developer.android.com.

If you have specific questions about your app, let us know on Google+ (+Android Developers) or Twitter (@AndroidDev)!

Saturday, November 17, 2012

YouTube TV Pop Out

When you right-click on a YouTube video and select "pop out", you'll notice a new TV-optimized interface. There are new buttons for pausing the video, fast forward and rewind, searching YouTube and visiting a visual homepage.


Click the "home" button or press "g" to find videos from various categories like sports, science, comedy, news, music. Use the keyboard arrows to navigate to a different category and browse the videos. Press "Esc" to go back to the previous screen.


The TV-optimized interface replaces YouTube Leanback and it's also available if you visit youtube.com/tv.

YouTube has made it easier to watch YouTube videos on your TV by pairing a mobile device to a Google TV, Xbox 360, PlayStation 3, Blu-ray player or smart TV. You just need to open the YouTube app or go to youtube.com/tv on your TV (or computer), find the pairing section and get the code. Then go to m.youtube.com on your mobile device or open YouTube's Android app, find the "add TV" option in the settings or the "pair with YouTube TV" option in the menu and enter the code. Google TV is automatically paired with all the devices from the same WiFi network, but only if you use the latest software. Now you can control your YouTube TV screen from your mobile device just like using Apple's AirPlay feature. Touch the "play" button to send the video to your TV, you can pause or resume the video, add videos to a queue, skip to the next video, change the volume and more.




{ Thanks, Sterling. }