12 October 2015

Bringing Google Cardboard and VR to the world

Originally posted on the Google Developers Blog

Posted by Brandon Wuest, Software Engineer & Stereoscopic Sightseer

Google Cardboard is bringing virtual reality worldwide. Starting today, the Google Cardboard app is available in 39 languages and over 100 countries on both Android and iOS devices. Additionally, the Cardboard developer docs are now published in 10 languages to help developers build great VR experiences. With more than 15 million installs of Cardboard apps from Google Play, we're excited to bring VR to even more people around the world.

More Works with Google Cardboard viewers

Anyone can make their own Cardboard viewer with the open designs ready for download. If you'd rather not DIY, choose from the growing family of certified viewers, including the Mattel View-Master and Zeiss VR One GX, on sale now.

Better tools for building

The Cardboard SDKs for Android and Unity have been updated to address your top two requests: drift correction and Unity performance. This update includes a major overhaul of the sensor fusion algorithms that integrate the signals from the gyroscope and accelerometer. These improvements substantially decrease drift, especially on phones with lower-quality sensors. The Cardboard SDK for Unity now supports a fully Unity-native distortion pass. This improves performance by avoiding all major plugin overhead, and enables Cardboard apps to work with Metal rendering on iOS and multi-threaded rendering on Android. All of this adds up to better VR experiences for your users.

More places

Finally, to help bring you to more places, you can now explore Google Street View in Cardboard. So, download the updated Google Street View app for Android or iOS, and grab your Cardboard to immerse yourself in destinations around the world.

With Cardboard available in more places, we're hoping to bring the world just a little bit closer to everyone. Happy exploring!

Watch Google Play’s Playtime event: How to find success for your app or game business

Posted by Lily Sheringham, The Google Play team

Google Play has kicked off its annual event series Playtime, which is running in 12 countries globally. Playtime offers developers the opportunity to learn tips and best practices about how to grow your app or games business and succeed on Android and Google Play.

You can now watch the Playtime talks, listed below, on the Android Developers YouTube channel. The playlist opens with a video about inspirational developers who are changing the world around them with their apps.

Build better apps

You say you want a mobile revolution (13 minutes)

There are now more than one billion Android users worldwide—a long way from when we launched the first Android phone back in 2008. Hear the latest about the Android and Google Play momentum.

Build better (25 minutes)

Learn top tips that you should consider when developing and distributing a successful app or game and how you can leverage M, the Google Play Developer Console and Android Studio.

Grow a valuable audience

Grow & engage users from the Google Play Developer Console (7 minutes)

Learn from other developers who have taken advantage of Store Listing Experiments and other tools in the Developer Console to dramatically increase their conversions.

Maximise installs from every channel (11 minutes)

Get insights into how app promotion can help you reach your audience at the right time. Learn how you can maximize installs from every channel, collect data and insights, automate management and drive user engagement and lifetime value.

How to succeed in the kids and family space (22 minutes)

Learn how to design high-quality apps for families and how to successfully engage your audience. You'll also get practical tips to help you boost your reach, retention and revenue.

Engage and retain your app’s users

The rules of games, for apps (24 minutes)

Learn how games drive monetization and how to turn these insights into best practices for apps.

Boost engagement with smarter interactions (28 minutes)

How do you connect with your users? How does your app interact with the world around us? This session highlights the most exciting new developer features of the Android platform to help you improve the way you engage with your app users.

Grow your game business & engage your players

Grow your business with Player Analytics (24 minutes)

Learn how Player Analytics gives game developers unique insight into the first few moments of gameplay, what happens before critical events like churning or spending, and which players are likely to spend and churn.

Smarter player engagement (23 minutes)

Learn how successful game developers make full use of the Google Play platform to engage their players for months, if not years.

The future of gaming at Google (26 minutes)

Learn about the current ecosystem and the features across platforms that will help you achieve success on Android. Hear about virtual reality games and products which will inspire the development of games in the future.

Monetization & international growth

Monetization and pricing strategies for different users (17 minutes)

Get key insights into how having a considered price and revenue optimisation strategy can help you maximize revenue from very different users.

Go global by being local (13 minutes)

Hear pro tips and best practices, including first hand experiences from apps and games developers, that will help you grow the reach of your apps and games globally.

Going global - developers share their tips (22 minutes)

Gain insight into best practices and learn how to develop a successful global app and games business from Google Play and developer panelists from Citymapper, Jelly Button Games, Musixmatch and Social Point.

Developers share their tips for success

Developer talk #1: Material Design for Forza Football (5 minutes)

Learn and get inspired from best practices on Material Design presented by Sebastian Fürle - Android Developer, Football Addicts

Developer talk #2: Directed creativity: From build weeks to billions (11 minutes)

Learn and get inspired from best practices on directed creativity, from building your app to distribution presented by Tom Grinsted - Group Product Manager: Mobile & Devices, Guardian News and Media

Developer talk #3: Building apps for fast growth markets (8 minutes)

Learn about building apps for fast growth and emerging markets from Sergio Cucinella - Software Engineer, Truecaller

For more videos about Android development and finding success on Google Play, subscribe to the Android Developers channel on YouTube and follow +Android Developers.

07 October 2015

Keep users’ content safe with Google Drive

Posted by Dan McGrath, Product Manager, Drive SDK & Partnerships

Chances are, you’re developing an app that creates or manages data. And chances are, your users really care about that content — be it photos and documents, or calorie counts and exercise stats.

Whatever it is, you probably don’t want it stuck on a single device — especially since people are replacing their phones and tablets every couple of years (every now and then… shtuff happens). With Google Drive, you can help users access their data at any time, from just about anywhere:

  • Drive APIs give developers a free and easy way to save and retrieve user content using Google Drive
  • In Android 6.0 Marshmallow, there’s also a new way to save app data and settings to Drive automatically

As your app grows in popularity, Google Drive can scale along with it. In fact, WhatsApp now lets users back up their media and conversations to Google Drive, which translates to about one saved item for every person on the planet — every single day.

Visit our developer site to learn more, and definitely reach out if you want to discuss more in-depth integrations. We’re here to help make your app great, and to keep users’ content safe.

06 October 2015

In-app translations in Android Marshmallow

Posted by, Barak Turovsky, Product Lead, Google Translate

Google Translate is used by more than 500 million people every month, translating more than 100 billion words every single day.

Beginning this week, Android mobile users who have the Translate app installed will be able to translate in 90 languages right within some of their favorite apps on any device running the newest version of Android’s operating system (Android 6.0, Marshmallow).

Translating a TripAdvisor review from Portuguese

Composing a WhatsApp message in Russian

Android apps that use Android text selection behavior will already have this feature enabled, so no extra steps need to be taken. Developers who created custom text selection behavior for their apps can easily implement this feature by following the below steps:

Scan via the PackageManager through all packages that have the PROCESS_TEXT intent filter (for example: com.google.android.apps.translate - if it installed) and add them as MenuItems into TextView selections for your app

  1. To query the package manager, first build an intent with the action

    private Intent createProcessTextIntent() {
        return new Intent()

  2. Then retrieve the supported activities

    private List getSupportedActivities() {
        PackageManager packageManager =

  3. add an item for each retrieved activity and attach an intent to it to launch the action

    public void onInitializeMenu(Menu menu) {
        // Start with a menu Item order value that is high enough
        // so that your "PROCESS_TEXT" menu items appear after the
        // standard selection menu items like Cut, Copy, Paste.
        int menuItemOrder = 100;
        for (ResolveInfo resolveInfo : getSupportedActivities()) {
            menu.add(Menu.NONE, Menu.NONE,

The label for each item can be retrieved with:


The intent for each item can be created reusing the filter intent that you defined before and adding the missing data:

private Intent createProcessTextIntentForResolveInfo(ResolveInfo info) {
    return createProcessTextIntent()
            .putExtra(Intent.EXTRA_PROCESS_TEXT_READONLY, !

Adding the translation option to your apps text selection menu (if you don’t use default Android text selection behavior) is easy and takes just a few extra lines of code. And remember, when a user is composing a text to translate, your app you should keep the selection when the Translate app is triggered.

With this new feature, Android Translate app users users will be able to easily translate right from within participating apps. We will be adding more documentation and sample code on this feature in the upcoming weeks.

05 October 2015

Inside Android’s Easter Egg Tradition

Posted by, Natalie Hammel, ½ of Nat & Lo’s 20% Project

A bit more than five years ago, I got my first smartphone. It was the Nexus One. And I didn’t know it at the time, but it was hiding a zombie gingerbread painting inside it. The first (of now many) Android “platform” easter eggs.

Android actually has a long, rich history of various mysterious and silly things tucked away inside its code for developers to enjoy. But its “platform” or “version number” easter eggs are probably the most elaborate and well-known.

Earlier this summer, my friend at work Lo and I started this project to go find out about different Google stuff we’re curious about. And one of the things we wanted to know more about was how the Android lawn sculptures get made. Which lead to us also finding out about why Android names its releases after tasty treats, and making this video.

As we were digging deeper into Android traditions, I decided to head up to Cambridge to get the inside scoop about Android’s easter eggs tradition from Android Framework Engineer / Easter Egg Painter, Dan Sandler. Which we just made this video about.

We hope you enjoyed, and maybe discovered a thing or two. And if you’re still in the mood for more Android video fun, the Android Developers YouTube channel was kind enough to recently compile all of our Android and Nexus videos to date in this playlist. (Take a look if you enjoy phone guts, silly songs, and/or stuffing your face with marshmallows.)

And since our project is ongoing, you can always subscribe to our YouTube channel if you want to check out what new stuff we’ll be learning about next.

Thanks for reading, watching, and easter-egging with us!

01 October 2015

How Google Cloud Messaging handles Doze in Android 6.0 Marshmallow

Posted by, Laurence Moroney, Developer Advocate

Android 6.0 Marshmallow introduces a new power saving feature called ‘Doze’. A device enters Doze when the user leaves it unplugged and stationary for a period of time and with the screen off. When this happens, the system defers application activity to save power. It will periodically and briefly resume normal operations, called an idle maintenance window, in order to perform app syncing and other pending operations.

If your app uses Google Cloud Messaging (GCM), you will need to take into account the following behaviors for users whose devices are in Doze.

GCM has two priority types for messages, called high priority and normal priority. When using high priority, GCM attempts to deliver messages immediately, waking a device in Doze, as needed. With Android Marshmallow, nothing changes here.

However, when using normal priority (the default priority), there are a number of different behaviors when the device is in Doze, including:

  • The most important change is that messages will be batched for devices in Doze. When the device enters its idle maintenance window, the batch of messages will be received.
  • We discard messages whose time_to_live expires while the device is in Doze (including TTL=0).

Despite this, it is recommended that, unless absolutely necessary, you keep your notifications as normal priority ones, as this will minimize battery impact. They will still sync during doze mode as described above, and of course once the device exits Doze.

High priority messages should only be used by applications that need to generate an immediate notification to the end user such as a chat app notification or an incoming phone call.

To learn more about Google Cloud Messaging message priorities, visit the Google Developers site.

30 September 2015

Android Studio 1.4

Posted by, Jamal Eason, Product Manager, Android

Today we are releasing the 1.4 update to the Android Studio stable release channel. Most of the work and enhancements for Android Studio 1.4 are under the hood. However we have a handful of new features that we hope you enjoy and integrate into your workflow.

Note that some of new features (e.g. vector assets) require you to use Gradle Plugin 1.4 for your app project. The beta version of the Gradle plugin (1.4.0-beta3 ) is available today on jcenter with the final version coming in the next few weeks.

New Features in Android Studio 1.4

Design Tools
  • Vector Assets

    Starting with API 21, you can use Vector Drawables for image assets. For most apps, using VectorDrawables decreases the amount of density dependent drawables you need to maintain, and will also give you sharp image assets regardless of the screen device densities your app supports.

    With Android Studio 1.4, we are making the process of importing SVG images or Material icons much easier. If you update your Gradle Android plugin to 1.4.0-beta3 (or higher) in the project structure dialogue or your project build.gradle file ( 'com.android.tools.build:gradle:1.4.0-beta3' ), you can now use the new Vector Asset Studio by right-clicking the res/drawable folder in your project and selecting New → Vector Asset from the content menu.

    We are also excited to offer backwards compatibility for your vector assets in Android Studio 1.4. Once you have a vectorDrawable image in your res/drawable, the Gradle plugin will automatically generate raster PNG images for API level 20 and below during build time. This means you only need to update and maintain your vector asset for your app project and Android Studio can take care of image conversion process. Note, it is still best practice to create density dependent launcher icons in your res/mipmap folder. Learn more by watching the DevByte video on the new Vector Asset Studio tool.

  • Theme Editor

    We understand that managing your app theme and style can be a bit complex. With Android Studio 1.4, we are releasing a preview of the Theme Editor to help with this task. This first version of the Theme Editor is focused on editing and updating the material theme colors (colors.xml) in your app project. In future releases, we will cover more attributes of your app theme and styles files. To access the editor, navigate from top level menu Tools → Android → Theme Editor.

  • Project Templates

    We know many of you use the New Project Wizard app templates to start a new app project or to quickly add an activity to an existing app. To help with the visual design of your apps, we updated the app templates to include the Android Design Support Library alongside the AppCompat Support library.

    From the template wizard you can start projects with a basic blank template with a floating action button or start from a range of user interface components such as the navigation drawer, or AppBar with scrolling view. We also re-introduced the empty app template for those who want minimum code generation when adding an activity to your project.

    With Android Studio 1.4, you can also validate your apps on the new Nexus 5X and Nexus 6P screen sizes.

Performance Monitors

  • GPU Rendering Monitor

    Now it is possible to quickly inspect the GPU rendering performance of your app. To enable GPU monitoring, make sure you turn on monitoring for your Android hardware device or emulator under Setting → Developer Options → Profile GPU rendering → In adb shell dumpsys gfxinfo . To learn more about the GPU rendering results, check out the developer documentation.

  • Network Monitor

    With Android Studio 1.4, you can also monitor the network usage of your app. With the monitor you can track the transmit and receive rates of your app over time.

Developer Services

  • Firebase

    It is now even easier to add a Firebase mobile backend to your Android app. Firebase includes data storage, user authentication, static hosting, and more. To access the feature, navigate from the top level menu and select File → Project Structure → Cloud. Learn more about Firebase in this tutorial.

Whats Next

For current developers on Android Studio, you can check for updates from the navigation menu (Help → Check for Update [Windows/Linux] , Android Studio → Check for Updates [OS X]) . For new users, you can learn more about Android Studio on the product overview page or download the stable version from the Android Studio download site.

We welcome feedback on how we can help you. Connect with the Android developer tools team on Google+.