Coding Android TV games is easy as pie



Posted by Alex Ames, Fun Propulsion Labs at Google*

We’re pleased to announce Pie Noon, a simple game created to demonstrate multi-player support on the Nexus Player, an Android TV device. Pie Noon is an open source, cross-platform game written in C++ which supports:



  • Up to 4 players using Bluetooth controllers.

  • Touch controls.

  • Google Play Games Services sign-in and leaderboards.

  • Other Android devices (you can play on your phone or tablet in single-player mode, or against human adversaries using Bluetooth controllers).


Pie Noon serves as a demonstration of how to use the SDL library in Android games as well as Google technologies like Flatbuffers, Mathfu, fplutil, and WebP.



  • Flatbuffers provides efficient serialization of the data loaded at run time for quick loading times. (Examples: schema files and loading compiled Flatbuffers)

  • Mathfu drives the rendering code, particle effects, scene layout, and more, allowing for efficient mathematical operations optimized with SIMD. (Example: particle system)

  • fplutil streamlines the build process for Android, making iteration faster and easier. Our Android build script makes use of it to easily compile and run on on Android devices.

  • WebP compresses image assets more efficiently than jpg or png file formats, allowing for smaller APK sizes.





You can download the game in the Play Store and the latest open source release from our GitHub page. We invite you to learn from the code to see how you can implement these libraries and utilities in your own Android games. Take advantage of our discussion list if you have any questions, and don’t forget to throw a few pies while you’re at it!



* Fun Propulsion Labs is a team within Google that's dedicated to advancing gaming on Android and other platforms.



Begin developing with Android Auto

Posted by Daniel Holle, Product Manager



At Google I/O back in June, we provided a preview of Android Auto. Today, we’re excited to announce the availability of our first APIs for building Auto-enabled apps for audio and messaging. Android apps can now be extended to the car in a way that is optimized for the driving experience.



For users, this means they simply connect their Android handheld to a compatible vehicle and begin utilizing a car-optimized Android experience that works with the car’s head unit display, steering wheel buttons, and more. For developers, the APIs and UX guidelines make it easy to provide a simple way for users to get the information they need while on the road. As an added bonus, the Android Auto APIs let developers easily extend their existing apps targeting Android 5.0 (API level 21) or higher to work in the car without having to worry about vehicle-specific hardware differences. This gives developers wide reach across manufacturers, model and regions, by just developing with one set of APIs and UX standards.





There are two use cases that Android Auto supports today:



  • Audio apps that expose content for users to browse and allow audio playback from the car, such as music, podcasts, news, etc.

  • Messaging apps that receive incoming notifications, read messages aloud, and send replies via voice from the car.


To help you get started with Android Auto, check out our Getting Started guide. It’s important to note that while the APIs are available today, apps extended with Android Auto cannot be published quite yet. More app categories will be supported in the future, providing more opportunities for developers and drivers of Android Auto. We encourage you to join the Android Auto Developers Google+ community to stay up-to-date on the latest news and timelines.



We’ve already started working with partners to develop experiences for Android Auto: iHeartRadio, Joyride, Kik, MLB.com, NPR, Pandora, PocketCasts, Songza, SoundCloud, Spotify, Stitcher, TextMe, textPlus, TuneIn, Umano, and WhatsApp. If you happen to be in the Los Angeles area, stop by the LA Auto Show through November 30 and visit us in the Hyundai booth to take Android Auto and an app or two for a test drive.



Keeping Your Saved Games in the Cloud

Posted by Todd Kerpelman, Developer Advocate



Saved Games Are the Future!



I think most of us have at least one or two games we play obsessively. Me? I'm a Sky Force 2014 guy. But maybe you're into matching colorful objects, battling monsters, or helping avians with their rage management issues. Either way, there's probably some game where you've spent hours upon hours upgrading your squad, reaching higher and higher levels, or unlocking every piece of bonus content in the game.



Now imagine losing all of that progress when you decide to get a new phone. Or reinstall your game. Yikes!



That's why, when Google Play Games launched, one of the very first features we included was the ability for users to save their game to the cloud using a service called the AppState API. For developers who didn't need an entire server-based infrastructure to run their game, but didn't want to lose players when they upgraded their devices, this feature was a real life-saver.



But many developers wanted even more. With AppState, you were limited to 4 slots of 256k of data each, and for some games, this just wasn't enough. So this past year at Google I/O, we launched an entirely new Saved Games feature, powered by Google Drive. This gave you huge amounts of space (up to 3MB per saved game with unlimited save slots), the ability to save a screenshot and metadata with your saved games, and some nice features like showing your player's saved games directly in the Google Play app.



...But AppState is Yesterday's News



Since the introduction of Saved Games, we've seen enough titles happily using the service and heard enough positive feedback from developers that we're convinced that Saved Games is the better offering and the way to go in the future. With that in mind, we've decided to start deprecating the old cloud save system using AppState and are encouraging everybody who's still using it to switch over to the new Saved Games feature (referred to in our libraries as "Snapshots").



What does this mean for you as a game developer?



If you haven't yet added Saved Games to your game, now would be the perfect time! The holidays are coming up and your players are going to start getting new devices over the next couple of months. Wouldn't it be great if they could take your game's progress with them? Unless, I guess, "not retaining users" is part of your business plan.



If you're already using the new Saved Games / Snapshot system, put your feet up and relax. None of these changes affect you. Okay, now put your feet down, and get back to work. You probably have a seasonal update to work on, don't you?



If you're using the old AppState system, you should start migrating your player's data over to the new Saved Games service. Luckily, it's easy to include both systems in the same game, so you should be able to migrate your users' data with their ever knowing. The process would probably work a little something like this:


  • Enable the new Saved Game service for your game by
    • Adding the Drive.SCOPE_APPFOLDER scope to your list of scopes in your GoogleApiClient.

    • Turning on Saved Games for your game in the Google Play Developer Console.

  • Next, when your app tries to load the user's saved game
    • First see if any saved game exists using the new Saved Games service. If there is, go ahead and use it.

    • Otherwise, grab their saved game from the AppState service.

  • When you save the user's game back to the cloud, save it using the new Saved Games service.

  • And that should be it! The next time your user loads up your game, it will find their saved data in the new Saved Games service, and they'll be all set.

  • We've built a sample app that demonstrates how to perform these steps in your application, so we encourage you to check it out.


In a few months, we will be modifying the old AppState service to be read-only. You'll still be able to read your user's old cloud save games and transfer them to the new Saved Games service, but you'll no longer be able to save games using the old service. We are evaluating early Q2 of 2015 to make this change, which should give you enough time to push your "start using Saved Games" update to the world.



If you want to find out more about Saved Games and how they work, feel free to review our documentation, our sample applications, or our Game On! videos. And we look forward to many more hours of gaming, no matter how many times we switch devices.



Google Play services 6.5

Posted by Ian Lake, Developer Advocate

To offer more seamless integration of Google products within your app, we've now rolled out Google Play services 6.5.



Google Play services 6.5 includes new features in Google Maps, Google Drive and Google Wallet as well as the recently launched Google Fit API. We are also providing developers with more granular control over which Google Play services APIs your app depends on to help you maintain a lean app.



Google Maps


We’re making it easier to get directions to places from your app! The Google Maps Android API now offers a map toolbar to let users open Google Maps and immediately get directions and turn by turn navigation to the selected marker. This map toolbar will show by default when you compile against Google Play services 6.5.





In addition, there is also a new ‘lite mode’ map option, ideal for situations where you want to provide a number of smaller maps, or a map that is so small that meaningful interaction is impractical, such as a thumbnail in a list. A lite mode map is a bitmap image of a map at a specified location and zoom level.



In lite mode, markers and shapes are drawn client-side on top of the static image, so you still have full control over them. Lite mode supports all of the map types, the My Location layer, and a subset of the functionality of a fully-interactive map. Users can tap on the map to launch Google Maps when they need more details.



The Google Maps Android API also exposes a new getMapAsync(OnMapReadyCallback) method to MapFragment and MapView which will notify you exactly when the map is ready. This serves as a replacement for the now deprecated getMap() method.



We’re also exposing the Google Maps for Android app intents available to your apps including displaying the map, searching, starting turn by turn navigation, and opening Street View so you can build upon the familiar and powerful maps already available on the device.



Drive


You can now add both public and application private custom file properties to a Drive file which can be used to build very efficient search queries and allow apps to save information which is guaranteed to persist across editing by other apps.



We’ve also made it even easier to make syncing your files to Drive both user and battery friendly with the ability to control when files are uploaded by network type or charging status and cancel pending uploads.



Google Wallet


In addition to the existing ‘Buy with Google’ button available to quickly purchase goods & services using Google Wallet, this release adds a ‘Donate with Google’ button for providing the same ease of use in collecting donations.



Google Fit



The Google Fit SDK was recently officially released as part of Google Play services and can be used to super-charge your fitness apps with a simple API for working with sensors, recording activity data, and reading the user’s aggregated fitness data.



In this release, we’ve made it easier for developers to add activity segments (predefined time periods of running, walking, cycling, etc) when inserting sessions, making it easy to support pauses or multiple activity type workouts. We’ll also be adding additional samples to help kick-start your Google Fit integration.



Granular Dependency Management



As we’ve continued to add more APIs across the wide range of Google services, it can be hard to maintain a lean app, particularly if you're only using a portion of the available APIs. Now with Google Play services 6.5, you’ll be able to depend only on a minimal common library and the exact APIs your app needs. This makes it very lightweight to get started with Google Play services.



SDK Now Available


You can get started developing today by downloading the Google Play services SDK from the Android SDK Manager.



To learn more about Google Play services and the APIs available to you through it, visit the Google Play Services section on the Android Developer site.





Google Keep: Share ideas with friends and family

Sticky notes on refrigerators were once the preferred way to say, “We’re out of bread - could you pick some up?” Now with Google Keep, not only can you jot down ideas or put together shopping lists, you can also share them with friends and family and work on them at the same time. So next time you create a list, share it on Keep and watch as items get checked off in real time! No need for text messages back and forth—get things done together, quicker.
Searching for your notes is simpler now too. You can filter notes by color and other attributes such as whether they’re shared, have a reminder, are lists, or have an image or audio. Find what you’re looking for even faster, and let Keep do the remembering for you.


Google Keep is available for free on Google Play for your Android phones (Android 4.0, Ice Cream Sandwich and above). For existing users, the sharing feature will start rolling out today on Google Play and is already available on the web and the Chrome Web Store.

Posted by Ken Thai, Software Engineer and Chief Listmaker

Curved glass and stitched leather: ASUS ZenWatch powered by Android Wear

Every new Android Wear device makes it easier to match your style, and today we’re introducing another great watch into the mix: the ASUS ZenWatch!

For starters, the stitched leather strap and curved, stainless steel body make the ZenWatch both comfortable and attractive to wear. It also has a curved glass display, which provides a smooth surface for easy gestures, and a beautiful window for watch faces. Finally, the ZenWatch includes a unique set of sensors that help you keep track of your heart rate, step count, and even relaxation levels.

The ASUS ZenWatch is available to buy now for $199.99 from Google Play and Best Buy.

Posted by Jeff Chang, Senior Product Manager, Android Wear

EyeEm Improves User Engagement through Android Design

By Leticia Lago, Google Play team


EyeEm is a global community for photographers that goes beyond sharing photos with friends: photographers can share tips, take part in missions, and sell their photos. To win more customers, a design that best showcases photos from the community is very important for this Berlin-based company.



With the idea of bringing a beautiful, simple experience to their fast growing base of Android users, the team recently embarked on a redesign of their app. Following the Android design principles, they stripped back the UI and simplified navigation. This allowed them to deliver a more streamlined app experience, along with a clean, crisp design that presents photos beautifully. And it paid off. According to Ramzi Rizk, EyeEm co-founder and CTO, “Our new design helped improve user growth and retention across the board, in every single metric we have.”



In the following video, Rizk and colleague Matias Castello, Product Head of Mobile, talk about their experience applying Android design to their app and the improvements in user engagement it has achieved:






Resources to help you with design



To learn more about how to design your apps for Android devices and achieve great user engagement and retention, be sure to check out these resources:



  • Android Design — all the information you need to understand and implement Android design principles in your app.


  • Design.Bytes — presented by the Google designers who created Material Design and apps, such as the Google I/O 2014 app, these videos provide a fun and informative introduction to Android design.