New Google APIs Expands Mobile Developers Ability to Leverage Gaming and More on the Big Screen

Game Development
Posted 6/8/2015 8:27:55 AM by STUART PARKERSON, Publisher Emeritus

New Google APIs Expands Mobile Developers Ability to Leverage Gaming and More on the Big Screen
Google has released a number of new developer tools for Google Cast specifically designed to help mobile app and game app developers to bring new experiences to the TV.

The new Google Cast Remote Display APIs in Beta helps mobile developers to bring graphically intensive apps or games to Google Cast receivers with APIs for Android and iOS. Casting an Android screen has been an existing option for users and now the new Remote Display API allows developers to build a tailored, integrated experience, without requiring an identical mirroring of content between mobile devices and the Google Cast device.

Remote Display is available both iOS and Android using the same Google Cast icon allowing users to select a device. On Android, developers connect to the device using the helper class CastRemoteDisplayLocalService, then create a subclass of CastPresentation where they can call setContentView() to display any content. The contents of a CastPresentation are then sent over to the connected Google Cast device for display. 

On iOS, developers use the core Google Cast SDK to discover receivers and connect to one, then GCKRemoteDisplayChannel to establish a new Remote Display session. An 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, developers still need to register a Remote Display App ID using the Google Cast SDK Developer Console.

Also new are Autoplay and Queuing APIs, which 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 increase watch time, helping lift per-session watch times by 10-20% or more.

With this release, RemoteMediaPlayer is gaining a full media queue, allowing developers 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 will be augmented with the current queue of items as well as new OnPreloadStatusUpdatedListener, allowing developers to display what will be played next. This ensures that all connected devices can maintain a synchronized queue of upcoming media items.

The new Game Manager APIs 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 developers 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 now on Android with iOS and Chrome SDK updates to be available in the coming days.

Read More


About the author: STUART PARKERSON, Publisher Emeritus

Stuart Parkerson has an extensive background in niche technology publishing.

Subscribe to App Developer Daily

Latest headlines delivered to you daily.