03 December 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.

26 November 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?

2013 is almost here, and it’s looking to be another 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)!

14 November 2012

Android SDK Tools, Revision 21

Posted by Xavier Ducrohet, Android SDK Tech Lead, and Angana Ghosh, Product Manager in Android

Along with the Android 4.2 SDK, we also launched a brand new update of the Android SDK Tools (Revision 21). The update includes new tools and capabilities that can help you work more efficiently as you create applications. Tools such as a new multi-config editor, and new Lint rules will help you develop apps more quickly, while a new UI test framework will give you more ways automate testing and QA for your apps. For new developers, one-click SDK download and new app templates help you get started more quickly.

Multi-config editor

A new multi-configuration editor allows you to develop and prototype your UI across various orientations, screen sizes and locales. For example, while editing your layout in portrait mode, you can see if your edits aren't visible in the shorter landscape orientation. You can see previews for other screen sizes from small phones to large tablets, you can see previews for the layout using all the available language translations in your app, and so on. You can even see how the layout appears when it is included as a fragment in a different larger layout. Finally, Android allows you to create specialized layouts for any of these configurations, and the multi configuration editor shows you these overridden layouts.

Here is a screenshot of the layout editor showing one of the layouts from the Google I/O application, across a variety of screen sizes.


More app templates

Tools R21 brings three new app templates to help you to easily add new screens to your app. There’s a new full-screen activity for use as a photo or video viewer, a settings activity to handle basic user preferences and a login activity to capture username/password.


UI Automator Test Framework

One common approach to UI testing is to run tests manually and verify that the app is behaving as expected. UI Automator is a new software testing framework available in Tools R21 that provides you with tools to easily automate UI testing tasks. It provides a GUI tool to scan and analyze the UI components of an Android application (uiautomatorviewer), a library containing APIs to create customized functional UI tests, and an execution engine to automate and run the tests against multiple physical devices. UI Automator runs on Android 4.1 (API level 16) or higher. To learn more head over to the UI Testing documentation.

One-click SDK installer

New Android SDK developers now have a convenient way to download all the various SDK components like Tools, Platform Tools, Eclipse ADT, and the latest system image with a single click. Existing developers can continue to manage their SDK components and get updates through the SDK Manager.

Revamped AVD creation dialog

The new dialog makes it easier to create Android Virtual Devices (AVDs) matching real device profiles. The AVDs will also appear in the layout editor to show you how the layouts will look.


More Lint rules

And to wrap things up there are 25 new lint rules which catch several common sources of bugs, for example deviations from Android design guide for icons, checks for mismanaged wakelocks, common sources of locale-related bugs and so on. So make sure you upgrade and let Lint loose on your projects before your next app update!

A minor bug-fix to the Android NDK is also available. For a complete list of what’s new, see the release notes for SDK Tools R21, ADT 21.0.0 and Android NDK R8c.

13 November 2012

Introducing Android 4.2, A New and Improved Jelly Bean

Posted by Angana Ghosh, Product Manager in Android, and Dirk Dougherty, Android Developer Relations Team

Today we are making Android 4.2 (Jelly Bean) SDK platform available for download. Below are some of the highlights of Android 4.2, API level 17.

Performance

We've worked with our partners to run Renderscript computation directly in the GPU on the Nexus 10, a first for any mobile computation platform.

New ways to engage users

Users can now place interactive lock screen widgets directly on their device lock screens, for instant access to favorite apps and content. With just a small update, you can adapt any app widget to run on the lock screen. Daydream is an interactive screensaver mode that users can encounter when their devices are charging or docked in a desk dock. You can create interactive daydreams that users display in this mode, and they can include any type of content.

New interaction and entertainment experiences

Android 4.2 introduces platform support for external displays that goes beyond mirroring. Your apps can now target unique content to any number of displays attached to an Android device.

Enhancements for international users

To help you create better apps for users in languages such as Arabic, Hebrew, and Persian, Android 4.2 includes native RTL support, including layout mirroring. With native RTL support, you can deliver the same great app experience to all of your users with minimal extra work. Android 4.2 also includes a variety of font and character optimizations for Korean, Japanese, Indic, Thai, Arabic and Hebrew writing systems.

To get started developing and testing, download the Android 4.2 Platform from the Android SDK Manager. For a complete overview of what's new, take a look at the Android 4.2 platform highlights or read more of the details in the API overview.

18 October 2012

Google Play Seller Support in India

Posted by Ibrahim Elbouchikhi, Product Manager on the Google Play team

Over the past year, Android device activations in India have jumped more than 400%, bringing millions of new users to Google Play and driving huge increases in app downloads. In the last six months, Android users in India downloaded more apps than in the previous three years combined, and India has rocketed to become the fourth-largest market worldwide for app downloads. To help developers capitalize on this tremendous growth, we are launching Google Play seller support in India.

Starting today, developers in India can sell paid applications, in-app products, and subscriptions in Google Play, with monthly payouts to their local bank accounts. They can take advantage of all of the tools offered by Google Play to monetize their products in the best way for their businesses, and they can target their products to the paid ecosystem of hundreds of millions of users in India and across the world.

If you are an Android developer based in India, you can get started right away by signing in to your Developer Console and setting up a Google Checkout merchant account. If your apps are already published as free, you can monetize them by adding in-app products or subscriptions. For new apps, you can publish the apps as paid, in addition to selling in-app products or subscriptions.

When you’ve prepared your apps and in-app products, you can price them in any available currencies, publish, and then receive payouts and financial data in your local currency. Visit the developer help center for complete details.

Along with seller support, we're also adding buyer’s currency support for India. We encourage developers everywhere to visit your Developer Console as soon as possible to set prices for your products in Indian Rupees and other new currencies (such as Russian Rubles).

Stay tuned for more announcements as we continue to roll out Google Play seller support to many more countries around the world.

15 October 2012

New Google Play Developer Console Available to Everyone

Posted by Eva-Lotta Lamm, Riccardo Govoni, and Ellie Powers of the Google Play team

We've been working on a new Google Play Developer Console, centered around how you make and publish apps, to create a foundation for the exciting features we have planned for the future. Earlier this year at Google I/O, we demoed the new version (video). Since then, we've been testing it out with tens of thousands of developers, reviewing their feedback and making adjustments.

Today, we’re very happy to announce that all developers can now try the new Google Play Developer Console. At its core, the Developer Console is how you put your app in front of hundreds of millions of Android users around the world, and track how your app is doing. We hope that with a streamlined publishing flow, new language options, and new user ratings statistics, you’ll have better tools for delivering great Android apps that delight users.

Sleeker, faster, easier to navigate


You spend a lot of time in the Developer Console, so we overhauled the interface for you. It's bright and appealing to look at, easy to find your way around using navigation and search, and it loads quickly even if you have a lot of apps.

Designed for speed. Quickly locate the app data and business information you use every day. More screenshots »


Track user ratings over time, and find ways to improve


One of the most important things you'll be able to do is track the success of your app over time — it's how you continue to iterate and make beautiful, successful apps. You'll see new statistics about your user ratings: a graph showing changes over time, for both the all-time average user rating and new user ratings that come in on a certain day. As with other statistics, you'll be able to break down the data by device, country, language, carrier, Android version, and app version. For example, after optimizing your app for tablets, you could track your ratings on popular tablets.

New charts for user ratings. You can now track user ratings over time and across countries. More screenshots »


Better publishing workflow


We've completely revamped and streamlined the app publishing process to give you more time to build great apps. You can start with either an APK or an app name, and you can save before you have all of the information. You can also now see differences between the new and old versions of an app, making it easy to catch unintentional changes before you publish a new version to your users.

More languages for listings, with automated translations


You'll also enjoy a new app publishing flow and the ability to publish your app listing in 49 languages. Once you've saved any change to your application in the new Developer Console, your users will have the option of viewing an automatic translation of your listing on the web today and soon on devices — no additional action on your part is needed.

How can you try the new version?


Go to your Developer Console and click on “Try the new version” in the header or go directly to the new version. If you prefer the new version, don't forget to bookmark the new URL.

Please note that we're not quite done yet, so the following advanced features are not yet supported in the new Google Play Developer Console: multiple APK support, APK Expansion Files and announcements. To use these features, you can click “Switch back” in the header at any time to return to the old version.

Click the “Feedback” link in the header to let us know what you think, so that we can continue to improve your experience as a Google Play developer. Thank you for all of the feedback so far.


08 October 2012

Building Quality Tablet Apps

Posted by Reto Meier, Android Developer Relations Tech Lead

With the release of Nexus 7 earlier this year, we shared some tips on how you can get your apps ready for a new wave of Android tablets. With the holiday season now approaching, we’re creating even more ways for great tablet apps to be featured in Google Play - including a series of new app collections that highlight great apps specifically for tablet users.

To help you take advantage of the opportunity provided by the growing tablet market, we’ve put together this Tablet App Quality Checklist to make it easier for you to ensure your app meets the expectations of tablet users.

The checklist includes a number of key focus areas for building apps that are a great experience on tablets, including:
  • Optimizing your layouts for larger screens
  • Taking advantage of extra screen area available on tablets
  • Using Icons and other assets that are designed for tablet screens

Each focus area comprises several smaller tasks or best practices. As you move through the checklist, you'll find links to support resources that can help you address the topics raised in each task.

The benefits of building an app that works great on tablets is evident in the experiences of Mint.com, Tiny Co, and Instapaper who reported increased user engagement, better monetization, and more downloads from tablet users. You can find out more about their experience in these developer case studies.

The Tablet Quality Checklist is a great place to get started, but it’s just the beginning. We’ll be sharing more tablet development tips every day this week on +Android Developers. In Android Developers Live, Tuesday’s Android Design in Action broadcast will focus on optimizing user experience for tablets, on Thursday we’ll be interviewing our tablet case studies during Developers Strike Back, and on Friday’s live YouTube broadcasts of The App Clinic and Friday Games Review will be reviewing apps and games on Android tablets.

What are your best tips for building great
tablet apps?

Join the discussion on
+Android Developers