Posted:

Posted by Leon Nicholls, Developer Programs Engineer

Today we launched the Google Cast Remote Display plugin for Unity to make it easy to take your Unity games to TVs. The Google Cast Remote Display APIs use the powerful GPUs, CPUs and sensors of your Android or iOS mobile device to render a local display on your mobile device and a remote display on your TV.

Unity is a very popular cross-platform game development platform that supports mobile devices. By combining the Google Cast Remote Display technology with the amazing rendering engine of Unity, you can now develop high-end gaming experiences that users can play on an inexpensive Chromecast and other Google Cast devices.


Games Using the Plugin

We have exciting gaming apps from our partners that already use the Remote Display plugin for Unity, with many more coming shortly.

Monopoly Here & Now is the latest twist on the classic Monopoly game. Travel the world visiting some of the world’s most iconic cities and landmarks and race to be the first player to fill your passport with stamps to win! It's a fun new way to play for the whole family.

Risk brings the original game of strategic conquest to the big screen. Challenge your friends, build your army, and conquer the world! The game includes the classic world map as well as two additional themed maps.

These games show that you can create games that look beautiful, using the power of a phone or tablet and send that amazing world to the TV.

Add the Remote Display Plugin to Your Game

You can download the Remote Display plugin for Unity from either GitHub or the Unity Asset Store. If you have an existing Unity game, simply import the Remote Display package and add the CastRemoteDisplayManager prefab to your scene. Next, set up cameras for the local and remote displays and configure them with the CastRemoteDisplayManager.

To display a Cast button in the UI so the user can select a Google Cast device, add the CastDefaultUI prefab to your scene.

Now you are ready to build and run the app. Once you connect to a Cast device you will see the remote camera view on the TV.

You have to consider how you will adapt your game interactions to support a multi-screen user experience. You can use the mobile device sensors to create abstract controls which interact with actions on the screen via motion or touch. Or you can create virtual controls where the player touches something on the device to control something else on the screen.

For visual design it is important not to fatigue the player by making them constantly look up and down. The Google Cast UX team has developed the Google Cast Games UX Guidelines to explain how to make the user experience of cast-enabled games consistent and predictable.

Developer Resources

Learn more about Google's official Unity plugins here. To see a more detailed description on how to use the Remote Display plugin for Unity, read our developer documentation and try our codelab. We have also published a sample Unity game on the Unity Asset Store and GitHub that is UX compliant. Join our G+ community to share your Google Cast developer experience.

With over 20 million Chromecast devices sold, the opportunity for developers is huge, and it’s simple to add Remote Display to an existing Unity game. Now you can take your game to the biggest screen in millions of user’s homes.

Posted:

Posted by Jeanie Santoso, Merchandise Marketing Manager

Chromecast, our first Google Cast device, has seen great success with 17 million devices already sold and over 1.5 billion touches of the Cast button. Consumers now get all the benefits of their easy to use personal mobile devices, with content displayed on the largest and most beautiful screen in the house. By adding Google Cast functionality to their apps, developers can gain visits, engagement, and/or higher monetization. Here are four real-world examples showing how very different companies are successfully using Google Cast technology. Read on to learn more about their successes and how to get started.

Comedy Central sees 50% more videos viewed by Chromecast users

The Comedy Central app lets fans watch their favorite shows in full and on demand from mobile devices. The company created a cast-enabled app so users could bring their small screen experience to their TVs. Now with Chromecast, users watch at least 50 percent more video, with 1.5 times more visits than the average Comedy Central app user. “The user adoption and volume we saw immediately at launch was pleasantly surprising,” says Ben Hurst, senior vice president, mobile and emerging platforms, Viacom Music and Entertainment Group. “We feel that Chromecast was a clear success for the Comedy Central app.”

Read the full Comedy Central case study here

Just Dance Now sees 2.5x monetization with Chromecast users

Interactive-game giant Ubisoft adopted Google Cast technology as a new way to experience their Just Dance Now game. As the game requires a controller and a main screen on which the game is displayed, Ubisoft saw Chromecast as the simplest and most accessible way to play. Chromecast represents 30 percent of all songs launched on the game in the US. Chromecast players monetize 2.5 times more than other players - they’re more engaged, play longer and more often than other players. Ubisoft also has seen more long-term subscribers with Chromecast. “The best Just Dance Now experience is on a big screen, and Chromecast brings an amazingly quick launch and ease of use for players to get into the game,” says Björn Törnqvist, Ubisoft technical director.

Read the full Just Dance Now case study here

Fitnet sees 35% higher engagement in Chromecast users

Fitnet is a mobile app that delivers video workouts and converts your smartphone’s or tablet’s camera into a biometric sensor to intelligently analyze your synchronicity with the trainer. The app provides a real-time score based on the user’s individual performance. The company turned to Chromecast to provide a compelling, integrated big screen user experience so users don’t need to stare at a tiny display to follow along. Chromecast users now perform 35 percent better on key engagement metrics Fitnet regard as critical to their success”—metrics such as logins, exploring new workouts, and actively engaging in workout content. “Integrating with Google Cast technology has been an excellent investment of our time and resources, and a key feature that has helped us to develop a unique, compelling experience for our users,” Bob Summers, Fitnet founder and CEO.

Read the full Fitnet case study here

Haystack TV doubled average weekly viewing time

Haystack TV is a personal news channel that lets consumers watch news on any screen, at any time. The company integrated Google Cast technology so users can browse their headline news, choose other videos to play, and even remove videos from their play queue without disrupting the current video on their TV. With Chromecast, average weekly viewing time has doubled. One-third of Haystack TV users now view their news via Chromecast. “We’re in the midst of a revolution in the world of television. More and more people are ‘cutting the cord’ and favoring over-the-top (OTT) services such as Haystack TV,” says Ish Harshawat, Haystack TV co-founder. “Chromecast is the perfect device for watching Haystack TV on the big screen. We wouldn't be where we are today without Chromecast.”

Read the full Haystack TV case study here

Integrate with Google Cast technology today

More and more developers are discovering what Google Cast technology can do for their app. Check out the Google Cast SDK for API references and take a look at our great sample apps to help get you started.

To learn more, visit developers.google.com/cast?utm_campaign=cast-drives-visits-715&utm_source=gdbc&utm_medium=blog

Posted:

Posted by Leon Nicholls, Developer Programs Engineer

Remote Display on Google Cast allows your app to display both on your mobile and Cast device at the same time. Processing is a programming language that allows artists and hobbyists to create advanced graphics and interactive exhibitions. By putting these two things together we were able to quickly create stunning visual art and display it on the big screen just by bringing our phone to the party or gallery. This article describes how we added support for the Google Cast Remote Display APIs to Processing for Android and how you can too.

An example app from the popular Processing toxiclibs library on Cast. Download the code and run it on your own Chromecast!

A little background

Processing has its own IDE and has many contributed libraries that hide the technical details of various input, output and rendering technologies. Users of Processing with just basic programming skills can create complicated graphical scenes and visualizations.

To write a program in the Processing IDE you create a “sketch” which involves adding code to life-cycle callbacks that initialize and draw the scene. You can run the sketch as a Java program on your desktop. You can also enable support for Processing for Android and then run the same sketch as an app on your Android mobile device. It also supports touch events and sensor data to interact with the generated apps.

Instead of just viewing the graphics on the small screen of the Android device, we can do better by projecting the graphics on a TV screen. Google Cast Remote Display APIs makes it easy to bring graphically intensive apps to Google Cast receivers by using the GPUs, CPUs and sensors available on the mobile devices you already have.

How we did it

Adding support for Remote Display involved modifying the Processing for Android Mode source code. To compile the Android Mode you first need to compile the source code of the Processing IDE. We started with the source code of the current stable release version 2.2.1 of the Processing IDE and compiled it using its Ant build script (detailed instructions are included along with the code download). We then downloaded the Android SDK and source code for the Android Mode 0232. After some minor changes to its build config to support the latest Android SDK version, we used Ant to build the Android Mode zip file. The zip file was unzipped into the Processing IDE modes directory.

We then used the IDE to open one of the Processing example sketches and exported it as an Android project. In the generated project we replaced the processing-core.jar library with the source code for Android Mode. We also added a Gradle build config to the project and then imported the project into Android Studio.

The main Activity for a Processing app is a descendent of the Android Mode PApplet class. The PApplet class uses a GLSurfaceView for rendering 2D and 3D graphics. We needed to change the code to use that same GLSurfaceView for the Remote Display API.

It is a requirement in the Google Cast Design Checklist for the Cast button to be visible on all screens. We changed PApplet to be an ActionBarActivity so that we can show the Cast button in the action bar. The Cast button was added by using a MediaRouteActionProvider. To only list Google Cast devices that support Remote Display, we used a MediaRouteSelector with an App ID we obtained from the Google Cast SDK Developer Console for a Remote Display Receiver.

Next, we created a class called PresentationService that extends CastRemoteDisplayLocalService. The service allows the app to keep the remote display running even when it goes into the background. The service requires a CastPresentation instance for displaying its content. The CastPresentation instance uses the GLSurfaceView from the PApplet class for its content view. However, setting the CastPresentation content view requires some changes to PApplet so that the GLSurfaceView isn’t initialized in its onCreate, but waits until the service onRemoteDisplaySessionStarted callback is invoked.

When the user selects a Cast device in the Cast button menu and the MediaRouter onRouteSelected event is called, the service is started with CastRemoteDisplayLocalService.startService. When the user disconnects from a Cast device using the Cast button, MediaRouter onRouteUnselected event is called and the service is stopped by using CastRemoteDisplayLocalService.stopService.

For the mobile display, we display an image bitmap and forward the PApplet touch events to the existing surfaceTouchEvent method. When you run the Android app, you can use touch gestures on the display of the mobile device to control the interaction on the TV. Take a look at this video of some of the Processing apps running on a Chromecast.

Most of the new code is contained in the PresentationService and RemoteDisplayHelper classes. Your mobile device needs to have at least Android KitKat and Google Play services version 7.5.71.

You can too

Now you can try the Remote Display APIs in your Processing apps. Instead of changing the generated code every time you export your Android Mode project, we recommend that you use our project as a base and simply copy your generated Android code and libraries to our project. Then simply modify the project build file and update the manifest to start the app with your sketch’s main Activity.

To see a more detailed description on how to use the Remote Display APIs, read our developer documentation. We are eager to see what Processing artists can do with this code in their projects.

Posted:

Posted by Nathan Camarillo and David Allison, Google Cast Product Managers

Google Cast makes it easy for developers to extend their mobile experiences to bigger screens and speakers. Since the launch of Chromecast, the first Google Cast device, we’ve seen tremendous success. 17 million Chromecast devices have been sold, with 1.5 billion touches of the Cast button, changing the way people watch TV. In the US, active Chromecast users are consuming 66% more content per day than at launch in July 2013. We see a 45% increase in YouTube watch time upon a Chromecast activation.

The Google Cast ecosystem continues to grow, with a range of new entertainment devices with Google Cast built-in-- from Chromecast and Android TV devices to speakers and soundbars.

Today at Google I/O, we are announcing new developer tools specifically for mobile app and game developers to bring new experiences to the TV.

Google Cast Remote Display APIs (Beta)

We are making it easy for mobile developers to bring graphically intensive apps or games to Google Cast receivers with Google Cast Remote Display APIs for Android and iOS.

While Casting your Android screen is an existing option for users, the new Remote Display API allows mobile developers to build a tailored, integrated second screen experience, without requiring an identical mirroring of content between mobile devices and the Google Cast device.

Remote Display will be available both iOS and Android. Your app will contain the same Google Cast icon allowing users to select a device. On Android, you’ll connect to the device using the helper class CastRemoteDisplayLocalService, then create a subclass of CastPresentation where you can call setContentView() to display any content you want (including drawing directly on a SurfaceView!). The contents of your CastPresentation are then sent over to the connected Google Cast device for display. On iOS, you’ll use the core Google Cast SDK to discover receivers and connect to one, then GCKRemoteDisplayChannel to establish a new Remote Display session. Your app will then send video and audio frames via the session. Adaptors for OpenGL ES and Metal are provided to help integrating Remote Display with existing rendering code.

There’s no need to write a receiver app as the Remote Display APIs are supported natively by all Google Cast receivers. However, you’ll still need to register a Remote Display App ID using the Google Cast SDK Developer Console.

See Remote Display in action with Driver® Speedboat Paradise:

Autoplay and Queuing APIs

Autoplay and Queuing APIs allow developers to create content queues and begin buffering a second video while a first video is finishing playback. This enables the creation of a continuous playback experience and can significantly increase watch time, helping lift per-session watch times by 10-20% or more.

Playing single media items on Chromecast has been something RemoteMediaPlayer (or CastCompanionLibrary’s VideoCastController) has been doing well for some time. With this release, RemoteMediaPlayer is gaining a full media queue, allowing you to queue up multiple MediaQueueItems, skip between items, set a repeat mode, reorder the queue, and enable autoplay for a seamless media playback experience. The MediaStatus returned to you will be augmented with the current queue of items as well as new OnPreloadStatusUpdatedListener, allowing you to display what will be played next. This ensures that all connected devices can easily maintain a synchronized queue of upcoming media items, opening up new possibilities of creating collaborative Google Cast media experiences.

Game Manager APIs for Google Cast

Since last November, Cast has had the ability to turn your TV screen into a game board, racetrack, dance floor, or trivia quiz—inviting everyone in your living room to use their phone as a personal game controller. Now we’re introducing new Game Manager APIs that will simplify the process for developers to build multiplayer games. To make it easier to synchronize game state across a potentially large number of players, Google Play services 7.5 introduces the Cast Game Manager API. This API, available for Android via the GameManagerClient class, iOS, Chrome, and for receivers, allows you to send messages and state changes to all connected clients and the receiver. All of the send methods also have a method that includes a specific player ID, making it possible to have multiple players sharing a single sender device.

All of these APIs are available on Android today. iOS and Chrome SDK updates will be available in the coming days.

You can learn more about these Google Cast APIs on the Google Cast Developers Site. We’re excited to see what you come up with to bring more mobile-centric experiences to the living room.