SlideShare a Scribd company logo
Cast your app to the Big Screen
Presented by: Amir Noel
Google Cast Android API
About Me
● Background: Java Server Side, Javascript
● Android Hobbyist
Outline
● Overview
● Chromecast Introduction
● Why cast enable your App?
● App Components
● Cast Receiver
● Cast Sender
● Sample App
● Device Debugging
● App Design Checklist
● Q&A
What is Google Cast?
Google Cast Sender Google Cast Receiver
Chromecast
● Takes advantage of the power you already have in your hand
● Device that works on any HDTV
● Low power consumption, can be powered by TV
● HDMI CEC for better integration with TVs and user control
● Small footprint that make it invisible behind the TV
● Extremely affordable ($35)
Terminology
● Google Cast is the technology
○ Chromecast is a device that supports Google Cast
● The Google Cast sender application refers to an app running on a mobile
device or laptop that can connect to a Google Cast device
● The Google Cast receiver application refers to an HTML application
running on Chromecast or other Google Cast receiver device
● Casting is the act of displaying media on a Google Cast device
Why Cast Enable Your App?
● American spend +5 hours on TV
● Increasing Mobile Media consumption
● Broad Market Penetration of Cast Receivers
Phone vs TV
● 17 inch - personal experience
● 10 foot - large comfortable viewing, shared experience
vs
How does it Work?
Google Cast Sender Google Cast Receiver
Session Initialization
Stream
ing
C
ontent
Stream
ing
Content
Device Discovery
Getting Started with Google Cast
● Receiver Application
○ HTML5
○ CSS
○ Javascript
● Register Application
● Sender Application
○ Chrome
○ iOS
○ Android
App Registration
Developer Console
Receiver Apps
● Styled Media Receiver
● Custom Receiver
● Default Media Receiver
Receiver Apps - Styled Media Receiver
Receiver Apps - Custom Receiver
Basic Custom Receiver App
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript"
src="//www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js"></script>
<script type="text/javascript">
window.onload = function() {
window.castReceiverManager = cast.receiver.CastReceiverManager.getInstance();
// initialize the CastReceiverManager with an application status message
window.castReceiverManager.start({statusText: 'Application is starting'});
};
</script>
</body>
</html>
Receiver Messaging
● cast.receiver.CastMessageBus
Communication with all senders using a namespace
● cast.receiver.CastChannel
Communication with an individual sender
(Point-to-Point for a given namespace)
Android Sender App Prerequisites
● Android SDK Manager
● Android Support Libraries
● Google Play Services SDK (9.2.0 or later)
Android Dependencies
Android Cast Integration
● Obtain and Initialize the CastContext
● Add a Cast Button
● Implement OptionsProvider
● Implement a SessionManagerListener to monitor for session events
● Register the SessionManagerListener with SessionManager
● Optionally setup a Message Channels between Sender and Receiver
CastContext Initialization
The Cast Button
Cast OptionsProvider Implementation
SessionManagerListener Implementation
Time to Dive In
Chromecast Device Debugging
● Receiver App and Device must both be registered in Developer Console
● Start a cast session between sender and receiver
● Open Chrome Browser and enter chrome://inspect
● Select Device for the receiver app by clicking Inspect
● Enable debug logging by entering
cast.receiver.logger.setLevelValue(cast.receiver.LoggerLevel.DEBUG);
Google Cast Design Checklist
● Your app is the remote
● It’s a Shared Experience
● It’s Cross Platform
Coming Soon...
● Cast support coming to Daydream 2.0 Euphrates update
● Cast support coming to Google Home
References
Documentation: https://developers.google.com/cast/docs/developers
Samples: https://github.com/googlecast
Developer Console: https://cast.google.com/publish/
Design Checklist: https://developers.google.com/cast/docs/design_checklist/
G+ Google Cast Developer Community: https://goo.gl/TPLDxj
Questions
Where to find me
● Twitter - @amirdnoel
● GitHub - https://github.com/goldengoose
● Blog - http://www.amirnoel.com
Thank You!
Cast your app to the big screen: Google Cast Android API

More Related Content

PPTX
Custom Chromecast Receiver Application
PPTX
Developing for Chromecast on Android
PPTX
MongoDB World 2018: Building Serverless Apps with MongoDB Atlas on Google Clo...
PDF
Building Translate on Glass
PDF
Deep dive into serverless on Google Cloud
PDF
Under the Hood with Headless WordPress and the Google Cloud Platform
PDF
Google Home and Google Assistant Workshop: Build your own serverless Action o...
PDF
ITCamp 2018 - Mete Atamel Ian Talarico - Google Home meets .NET containers on...
Custom Chromecast Receiver Application
Developing for Chromecast on Android
MongoDB World 2018: Building Serverless Apps with MongoDB Atlas on Google Clo...
Building Translate on Glass
Deep dive into serverless on Google Cloud
Under the Hood with Headless WordPress and the Google Cloud Platform
Google Home and Google Assistant Workshop: Build your own serverless Action o...
ITCamp 2018 - Mete Atamel Ian Talarico - Google Home meets .NET containers on...

Similar to Cast your app to the big screen: Google Cast Android API (20)

PPTX
Developing for Chromecast on Android
PDF
Building HTML5 Chromecast Apps
PDF
The chromecast's guide to the galaxy
PDF
Droidcon de 2014 google cast
PDF
Android App Development 01 : Getting Start
PDF
Introduction to Kubernetes with demo
PDF
Cyanogen Platform SDK
PDF
Introduction to Kubernetes and GKE
PDF
Desenvolver para Chromecast
PDF
Getting Started with Android - OSSPAC 2009
PDF
Cross Platform Mobile App Development
PDF
Building TV apps with Chromecast
PPTX
Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...
PDF
HTML5 vs Native Android: Smart Enterprises for the Future
PPTX
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
PDF
Building Kick Ass Video Games for the Cloud
ODP
Java Meetup - 12-03-15 - Android Development Workshop
PPT
Getting started with android dev and test perspective
PDF
Serverless Computing with Google Cloud
PPTX
Integrando sua app Android com Chromecast
Developing for Chromecast on Android
Building HTML5 Chromecast Apps
The chromecast's guide to the galaxy
Droidcon de 2014 google cast
Android App Development 01 : Getting Start
Introduction to Kubernetes with demo
Cyanogen Platform SDK
Introduction to Kubernetes and GKE
Desenvolver para Chromecast
Getting Started with Android - OSSPAC 2009
Cross Platform Mobile App Development
Building TV apps with Chromecast
Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...
HTML5 vs Native Android: Smart Enterprises for the Future
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Building Kick Ass Video Games for the Cloud
Java Meetup - 12-03-15 - Android Development Workshop
Getting started with android dev and test perspective
Serverless Computing with Google Cloud
Integrando sua app Android com Chromecast
Ad

Recently uploaded (20)

PDF
project resource management chapter-09.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Encapsulation theory and applications.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
Tartificialntelligence_presentation.pptx
PPTX
A Presentation on Touch Screen Technology
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
August Patch Tuesday
PDF
A novel scalable deep ensemble learning framework for big data classification...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Approach and Philosophy of On baking technology
project resource management chapter-09.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
1 - Historical Antecedents, Social Consideration.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Encapsulation theory and applications.pdf
Group 1 Presentation -Planning and Decision Making .pptx
Tartificialntelligence_presentation.pptx
A Presentation on Touch Screen Technology
Digital-Transformation-Roadmap-for-Companies.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Unlocking AI with Model Context Protocol (MCP)
August Patch Tuesday
A novel scalable deep ensemble learning framework for big data classification...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Heart disease approach using modified random forest and particle swarm optimi...
Chapter 5: Probability Theory and Statistics
Approach and Philosophy of On baking technology
Ad

Cast your app to the big screen: Google Cast Android API

  • 1. Cast your app to the Big Screen Presented by: Amir Noel Google Cast Android API
  • 2. About Me ● Background: Java Server Side, Javascript ● Android Hobbyist
  • 3. Outline ● Overview ● Chromecast Introduction ● Why cast enable your App? ● App Components ● Cast Receiver ● Cast Sender ● Sample App ● Device Debugging ● App Design Checklist ● Q&A
  • 4. What is Google Cast? Google Cast Sender Google Cast Receiver
  • 5. Chromecast ● Takes advantage of the power you already have in your hand ● Device that works on any HDTV ● Low power consumption, can be powered by TV ● HDMI CEC for better integration with TVs and user control ● Small footprint that make it invisible behind the TV ● Extremely affordable ($35)
  • 6. Terminology ● Google Cast is the technology ○ Chromecast is a device that supports Google Cast ● The Google Cast sender application refers to an app running on a mobile device or laptop that can connect to a Google Cast device ● The Google Cast receiver application refers to an HTML application running on Chromecast or other Google Cast receiver device ● Casting is the act of displaying media on a Google Cast device
  • 7. Why Cast Enable Your App? ● American spend +5 hours on TV ● Increasing Mobile Media consumption ● Broad Market Penetration of Cast Receivers
  • 8. Phone vs TV ● 17 inch - personal experience ● 10 foot - large comfortable viewing, shared experience vs
  • 9. How does it Work? Google Cast Sender Google Cast Receiver Session Initialization Stream ing C ontent Stream ing Content Device Discovery
  • 10. Getting Started with Google Cast ● Receiver Application ○ HTML5 ○ CSS ○ Javascript ● Register Application ● Sender Application ○ Chrome ○ iOS ○ Android
  • 13. Receiver Apps ● Styled Media Receiver ● Custom Receiver ● Default Media Receiver
  • 14. Receiver Apps - Styled Media Receiver
  • 15. Receiver Apps - Custom Receiver
  • 16. Basic Custom Receiver App <!DOCTYPE html> <html> <body> <script type="text/javascript" src="//www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js"></script> <script type="text/javascript"> window.onload = function() { window.castReceiverManager = cast.receiver.CastReceiverManager.getInstance(); // initialize the CastReceiverManager with an application status message window.castReceiverManager.start({statusText: 'Application is starting'}); }; </script> </body> </html>
  • 17. Receiver Messaging ● cast.receiver.CastMessageBus Communication with all senders using a namespace ● cast.receiver.CastChannel Communication with an individual sender (Point-to-Point for a given namespace)
  • 18. Android Sender App Prerequisites ● Android SDK Manager ● Android Support Libraries ● Google Play Services SDK (9.2.0 or later)
  • 20. Android Cast Integration ● Obtain and Initialize the CastContext ● Add a Cast Button ● Implement OptionsProvider ● Implement a SessionManagerListener to monitor for session events ● Register the SessionManagerListener with SessionManager ● Optionally setup a Message Channels between Sender and Receiver
  • 26. Chromecast Device Debugging ● Receiver App and Device must both be registered in Developer Console ● Start a cast session between sender and receiver ● Open Chrome Browser and enter chrome://inspect ● Select Device for the receiver app by clicking Inspect ● Enable debug logging by entering cast.receiver.logger.setLevelValue(cast.receiver.LoggerLevel.DEBUG);
  • 27. Google Cast Design Checklist ● Your app is the remote ● It’s a Shared Experience ● It’s Cross Platform
  • 28. Coming Soon... ● Cast support coming to Daydream 2.0 Euphrates update ● Cast support coming to Google Home
  • 29. References Documentation: https://developers.google.com/cast/docs/developers Samples: https://github.com/googlecast Developer Console: https://cast.google.com/publish/ Design Checklist: https://developers.google.com/cast/docs/design_checklist/ G+ Google Cast Developer Community: https://goo.gl/TPLDxj
  • 31. Where to find me ● Twitter - @amirdnoel ● GitHub - https://github.com/goldengoose ● Blog - http://www.amirnoel.com