This document discusses various techniques for streaming video on Android devices, including:
- The Android multimedia framework which supports playing media from files or streaming over protocols like RTSP, HTTP, and DASH. It supports formats like MP4, WebM, and MPEG-TS.
- Common approaches to video playback using classes like VideoView, SurfaceView with MediaPlayer, and ExoPlayer which supports adaptive streaming.
- Additional capabilities for Android TV like the Leanback UI components and TV Input Framework for building live TV apps.
- Chromecast capabilities for multi-screen experiences including the Cast SDK, default/styled/custom media receivers, and remote media playback control.
ExoPlayer is an open source, application level media player built on top of Android’s low level media APIs (Mediacodec and MediaExtractor). Google is already using it for Youtube and Movies app. It supports DASH, Smooth Streaming and HLS protocols.
Video Streaming: from the native Android player to uncoventional devicesMatteo Bonifazi
Getting a streaming video in your Android smartphone or tablet is no longer enough.In the latest period, Google shows how to push this concept forward to new appliances. Chromecast and Android TV are two of the most promising gadgets for upsetting the way users enjoy video streaming.
This talk we’ll give you an overview about the streaming in Android. Starting from video streaming on mobile devices, we will guide you into the evolution of the development through Chromecast up to Android TV. Matteo Bonifazi and Alessandro Martellucci will be illustrating this talk with their experiences developing mobile television applications for the main Italian broadcaster providers.
This talk is about some of the best practices in Media Playback and introduction to ExoPlayer - (Most of the content is taken from Ian Lake's Google I/O 16 talk)
[Android Codefest Germany] Adding x86 target to your Android app by Xavier Ha...BeMyApp
The Android Codefest Germany is a challenge on optimizing your existing Android NDK app on x86 processor or on building one.
It's still open until Sunday, November 24th, you can submit your app here: http://androidcodefest.bemyapp.com
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TVBeMyApp
Slides by Mihai Risca, Software Application Engineer at Intel at the Ultracode Munich Meetup #7 @ Werk1 Munich
http://www.meetup.com/Ultracode-Munich/events/219689131/
The unconventional devices for the Android video streamingMatteo Bonifazi
Streaming video is not just through Android smartphone and tablet.
The 2014 was the year where Chromecast reached its brightness, getting into 4 millions living rooms. The 2015 instead is the year of the Android TV, the Google way “to smart” the TV.
This talk we’ll give you an overview about the streaming in Android. Starting from video streaming on mobile devices, we will guide you into the evolution of the development through Chromecast up to Android TV.
Matteo Bonifazi and Alessandro Martellucci will be illustrating this talk with their experiences developing mobile television applications for the main Italian broadcaster providers.
ExoPlayer is an open source, application level media player built on top of Android’s low level media APIs (Mediacodec and MediaExtractor). Google is already using it for Youtube and Movies app. It supports DASH, Smooth Streaming and HLS protocols.
Video Streaming: from the native Android player to uncoventional devicesMatteo Bonifazi
Getting a streaming video in your Android smartphone or tablet is no longer enough.In the latest period, Google shows how to push this concept forward to new appliances. Chromecast and Android TV are two of the most promising gadgets for upsetting the way users enjoy video streaming.
This talk we’ll give you an overview about the streaming in Android. Starting from video streaming on mobile devices, we will guide you into the evolution of the development through Chromecast up to Android TV. Matteo Bonifazi and Alessandro Martellucci will be illustrating this talk with their experiences developing mobile television applications for the main Italian broadcaster providers.
This talk is about some of the best practices in Media Playback and introduction to ExoPlayer - (Most of the content is taken from Ian Lake's Google I/O 16 talk)
[Android Codefest Germany] Adding x86 target to your Android app by Xavier Ha...BeMyApp
The Android Codefest Germany is a challenge on optimizing your existing Android NDK app on x86 processor or on building one.
It's still open until Sunday, November 24th, you can submit your app here: http://androidcodefest.bemyapp.com
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TVBeMyApp
Slides by Mihai Risca, Software Application Engineer at Intel at the Ultracode Munich Meetup #7 @ Werk1 Munich
http://www.meetup.com/Ultracode-Munich/events/219689131/
The unconventional devices for the Android video streamingMatteo Bonifazi
Streaming video is not just through Android smartphone and tablet.
The 2014 was the year where Chromecast reached its brightness, getting into 4 millions living rooms. The 2015 instead is the year of the Android TV, the Google way “to smart” the TV.
This talk we’ll give you an overview about the streaming in Android. Starting from video streaming on mobile devices, we will guide you into the evolution of the development through Chromecast up to Android TV.
Matteo Bonifazi and Alessandro Martellucci will be illustrating this talk with their experiences developing mobile television applications for the main Italian broadcaster providers.
Video Streaming: from the native Android player to unconventional devicesAlessandro Martellucci
Getting a streaming video in your Android smartphone or tablet is no longer enough.In the latest period, Google shows how to push this concept forward to new appliances. Chromecast and Android TV are two of the most promising gadgets for upsetting the way users enjoy video streaming.
This talk we’ll give you an overview about the streaming in Android. Starting from video streaming on mobile devices, we will guide you into the evolution of the development through Chromecast up to Android TV. Matteo Bonifazi and Alessandro Martellucci will be illustrating this talk with their experiences developing mobile television applications for the main Italian broadcaster providers.
Android Pie, the latest release of Android, is officially available to World. In this talk, I will summarize new features and behaviour changes. This session will be useful for developers as well product managers who are getting their apps ready for Android 9.
Customizing AOSP For Different Embedded Devices And Integration at Applicatio...ijafrc
Android is a software stack that includes operating system, middle ware, applications for the development of devices. Android has evolved greatly and user experience in addition to consumer level efficiency along with integration of android powered devices also expanded. Because of its core aspects like open source nature and architectural modal it is becoming more innovative operating system. Android is being integrated and ported to various embedded devices this includes enterprise desktop IP phones, cameras, modem, sensors, and set-up boxes and automotive. One major advantage of using android framework beyond the mobile devices is the android applications can talk to the functionality of all these devices powered by android and developers need not to write several applications for different embedded systems. This paper looks at the challenges in android migration to the different embedded platforms and porting issues. Here we presented description of preparing and building AOSP in local environment and implementation with Programming for integrating user applications in android build system permanently.
This presentation was used during a lecture I delivered in Hive Pilani 2015 on Firefox OS and Firefox OS App Development for newbies.
The presentation aims to educate the audience enough to smooth the move to actual Firefox OS Development. The presentation therefore covers topics such as - Architecture, Bootstrap Process, Layer View of the OS etc.
What’s Android System?
Kinds of Android Devices
Kinds of Android Type
Android Source Code
Inside Android
Boot Sequence
About init File
Hands On
Nexus7
Pandaboard
How to Debug
Gaining actionable insights in real time enables organizations to grab opportunities and omit threats. Sensing the world, detecting actionable insights, and acting upon them has now become far easier than ever with the advancements of streaming SQL. Below are the topics discussed in this slide.
- Building stream processing applications using streaming SQL
- Deploying and monitoring streaming applications
- Scaling streaming applications
- Building domain specific business UIs
- Visualizing stream processing outputs via dashboards
Video Streaming: from the native Android player to unconventional devicesAlessandro Martellucci
Getting a streaming video in your Android smartphone or tablet is no longer enough.In the latest period, Google shows how to push this concept forward to new appliances. Chromecast and Android TV are two of the most promising gadgets for upsetting the way users enjoy video streaming.
This talk we’ll give you an overview about the streaming in Android. Starting from video streaming on mobile devices, we will guide you into the evolution of the development through Chromecast up to Android TV. Matteo Bonifazi and Alessandro Martellucci will be illustrating this talk with their experiences developing mobile television applications for the main Italian broadcaster providers.
Android Pie, the latest release of Android, is officially available to World. In this talk, I will summarize new features and behaviour changes. This session will be useful for developers as well product managers who are getting their apps ready for Android 9.
Customizing AOSP For Different Embedded Devices And Integration at Applicatio...ijafrc
Android is a software stack that includes operating system, middle ware, applications for the development of devices. Android has evolved greatly and user experience in addition to consumer level efficiency along with integration of android powered devices also expanded. Because of its core aspects like open source nature and architectural modal it is becoming more innovative operating system. Android is being integrated and ported to various embedded devices this includes enterprise desktop IP phones, cameras, modem, sensors, and set-up boxes and automotive. One major advantage of using android framework beyond the mobile devices is the android applications can talk to the functionality of all these devices powered by android and developers need not to write several applications for different embedded systems. This paper looks at the challenges in android migration to the different embedded platforms and porting issues. Here we presented description of preparing and building AOSP in local environment and implementation with Programming for integrating user applications in android build system permanently.
This presentation was used during a lecture I delivered in Hive Pilani 2015 on Firefox OS and Firefox OS App Development for newbies.
The presentation aims to educate the audience enough to smooth the move to actual Firefox OS Development. The presentation therefore covers topics such as - Architecture, Bootstrap Process, Layer View of the OS etc.
What’s Android System?
Kinds of Android Devices
Kinds of Android Type
Android Source Code
Inside Android
Boot Sequence
About init File
Hands On
Nexus7
Pandaboard
How to Debug
Gaining actionable insights in real time enables organizations to grab opportunities and omit threats. Sensing the world, detecting actionable insights, and acting upon them has now become far easier than ever with the advancements of streaming SQL. Below are the topics discussed in this slide.
- Building stream processing applications using streaming SQL
- Deploying and monitoring streaming applications
- Scaling streaming applications
- Building domain specific business UIs
- Visualizing stream processing outputs via dashboards
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...Ted Chien
My study group slide in 2009 for Google Android Development, describing the following topics:
Designing the Obvious,
Resources and Internationalization,
Orientation,
Adapter,
This presentation was used in the context of a FI-WARE webminar for introducing Kurento. Kurento is a framework for building multimedia and streaming applications based on predefined blocks. Send and receive median through RTP, WebRTC, HTTP and RTSP. Use processing for making face detection, plate recognition or object tracking. Use augmented reality, group communications or media mixing and blending among others. During the webminar, we used Kurento APIs for showing how to create media applications for videoconferencing or video streaming in a simple and seamless manner. We also demonstrated how these applications can be enriched with Kurento's advanced processing capabilities.
Marcel Prasetya (Software Engineer, Google Wave APIs Team) talks about "Google Wave API: Now and Beyond" as part of San Francisco Java User Group's November 10th, 2009 meetup event held in San Francisco, CA at Google Inc.
http://www.sfjava.org/calendar/11573532/
Sponsored By: TEKsystems Inc., Marakana Inc., Packt Publishing Ltd., and JetBrains Inc.
Organized and Recorded By: Marakana Inc.
Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/1DXFg0h.
Ben Christensen summarizes why the Rx programming model was chosen and demonstrates how it is applied to a variety of use cases. Filmed at qconsf.com.
Ben Christensen is a software engineer on the Netflix Edge Services Platform team responsible for fault tolerance, performance, architecture and scale while enabling millions of customers to access the Netflix experience across more than 1,000 different device types.
Monitoring as an entry point for collaborationJulien Pivotto
In the last years, we have been building complex stacks, made from lots of components. All of this backed by multiple teams. This talk will present how you can use monitoring to look at the business side and have everyone looking at the same dashboards, making cooperation a reality.
Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...Martin Etmajer
Until recently, applications ran on a handful of carefully curated technologies for years to come, deployments were static and teams siloed. In the microservices age, teams are cross-functional, pick the technologies they consider to work best for them, and are held accountable for what they produce. Application deployments are fine-grained, frequent, scalable and fully automated. What a shift and what a challenge for monitoring such environments! In this presentation, you'll learn how to obtain insights from your OpenShift environment by exploring various open-source monitoring, logging, and tracing technologies, including Elasticsearch, Fluentd, Hawkular, Heapster, Jolokia, Kibana, OpenTracing, Prometheus and ZipKin.
WebRTC Standards & Implementation Q&A - All about browser interoperabilityAmir Zmora
Hosting guest speaker Jan-Ivar Bruaroey of Mozilla Firefox WebRTC R&D team and contributor to adapter.js talking about Chrome and Firefox interoperability.
To view recording of this webinar please use below URL
http://wso2.com/library/webinars/2015/11/wso2-product-release-webinar-wso2-complex-event-processor-4.0/
In this webinar, Lasantha and Suho will discuss the following key features and improvements in detail:
Integrating WSO2 CEP with Apache Storm to achieve distributed real-time stream processing
Key features of the latest version of Siddhi
New transports that enhances integration capabilities of WSO2 CEP
Creating query templates using execution manager
Using the analytics dashboard to visualize results in real-time
Similar to The unconventional devices for the video streaming in Android (20)
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
3. • Reply is today a leading IT Services Company, which operates in Italy,
Germany, UK, Benelux, USA and Brazil.
• Open Reply is the company of Reply Group focused on open source
software, multichannel web solutions and mobile applications.
• Based in Rome, our team is based a young team of over 40 engineers
100% focused on mobile development (iOS, Android & Windows Phone).
• We are specialised in broadcasting, banking and Android OS
Customisation.
Open Reply
5. Engage users through streaming app
q In US more than 2 milion people watched last World Cup by a mobile App.1
q 270% increase in online video watched by smartphone and tablet.2
q More than one bilion tap on Google Chromecast cast button.3
q YouTube viewer habits prove “the bigger the screen, the longer people
watch.”4
1)WatchESPN app access 2)Nielsen Q3 ‘14 Total Audience report 3) Google’s Omid Kordestani interview 2015 4) Youtube usage internal analysis.
6. q Playing a video content on your handheld device.
q Streaming taiolered for the user with
q Easiest way to enjoy video and music on user TV with
Presentation Millestone
7. Android multimedia framework
Android support for playing several media types from media file stored inside
the application (raw resources, standalone files) or for OTT streaming.
*Camera, foto rendering and other media type are managed by it but they are out of scope for this talk.
Network Protocols
RTSP (RTP, SDP)
HTTP/HTTPS progressive streaming
HTTP/HTTPS live streaming
Dynamic adaptive streaming over HTTP (DASH)
Smooth Streaming
Core Media Formats
H.263 ->3GPP(.3gp),MPEG-4(.mp4)
H.264 AVC -> 3GPP(.3gp),MPEG-4(.mp4),MPEG-
TS(.ts)
MPEG-4 SP -> 3GPP(.3gp)
VP8 -> WebM(.webm),Matroska(.mkv)
Note. Any given mobile device may provide support for additional formats or file types not listed in the table.
8. Android multimedia framework documentation
50% Android multimedia framework questions are unaswered on
Stackoverflow
9. //1. Find the view from the layout
VideoView myVideoView = (VideoView)findViewById(R.id.myvideoview);
//2. Setup video url
myVideoView.setVideoURI(Uri.parse(SrcPath));
//3. Setup Video controller
myVideoView.setMediaController(new MediaController(this));
//4. Start playing
myVideoView.requestFocus();
myVideoView.start();
VideoView.java
Media Playback 1/2
10. //0. Get SurfaceView and its holder
mPreview = (SurfaceView)findViewById(R.id.surfaceView);
holder = mPreview.getHolder();
mp = new MediaPlayer(); //1. Create MediaPlayer object:
//2. Add SurfaceHolder callback - Aware when SurfaceView is created
holder.addCallback(new SurfaceHolder.Callback(){ ....
@Override
public void surfaceCreated(SurfaceHolder holder) {
mp.setDisplay(holder); //3. Attach the surface to the player
try {
mp.setDataSource(filepath);
//4. Prepare the Mediaplayer in sync or async mode ( prepareAsync() )
mp.prepare();
} catch (Exception e) {// Catch the exception}
mp.start(); //5. Start the player }...
});
MediaPlayer.java
Media Playback 2/2
11. ExoPlayer
ExoPlayer is a media player built on top of the MediaExtractor and MediaCodec
APIs released in Android 4.1 (API level 16).
ExoPlayer provides default TrackRenderer implementations for audio and
video, which make use of the MediaCodec and AudioTrack classes in the
Android framework.
During playback, your app can listen for events generated by the ExoPlayer
that indicates the overall state of the player (ExoPlayer.Listener).
12. player = ExoPlayer.Factory.newInstance(RENDERER_COUNT, minBuffer, maxBuffer);
// 2. Construct renderers.
DataSource dataSource = new UriDataSource(userAgent, bandwidthMeter);
HlsChunkSource chunkSource = new HlsChunkSource(dataSource, url, manifest, bandwidthMeter,
null,
HlsChunkSource.ADAPTIVE_MODE_SPLICE);
HlsSampleSource sampleSource = new HlsSampleSource(chunkSource, true, 3);
MediaCodecVideoTrackRenderer videoRenderer = new
MediaCodecVideoTrackRenderer(sampleSource,
MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT, 5000, player.getMainHandler(),
player, 50);
MediaCodecAudioTrackRenderer audioRenderer = new
MediaCodecAudioTrackRenderer(sampleSource);
player.prepare(videoRenderer, audioRenderer); // 3. Inject the renderers through prepare.
player.setSurface(surfaceView.getHolder().getSurface()); // 4. Pass the surface to the video renderer.
player.setPlayWhenReady(true); // 5. Start playback
…
…
player.release(); // Release when everything is done!
ExoPlayer.java
ExoPlayer – HLS implementation
13. What next?
q Built-in players
ü AwesomePlayer (default player selected)
ü NuPlayer (Apple HLS)
q Extra player factories can be registered
q DIY mediaplayer
ü Demuxing: android.media.mediaExtractor
ü Decoding: android.media.MediaCodec
ü Video rendering: android.media.MediaCodec
ü Audio rendering: android.media.AudioTrack
ü Implement the interface
frameworks/av/include/media/MediaPlayerInterface.h
19. Android Manifest features 2/2
Supporting landscape orientation is mandatory
No touch screen is required
<uses-feature android:name="android.hardware.sensor.accelerometer”
android:required="false" />
<uses-feature android:name="android.hardware.touchscreen”
android:required="false"/>
<activity android:name=”AndroidTvActivity”
android:screenOrientation="landscape" >
Limit your sensor! Your app doesn’t need to accelerate!!!
22. Building Live TV Apps
TV Input Framework provides a unified method for receiving
audio and video channel content from hardware sources and
software sources.
Android 5.0 (API level 21) or higher
TV Provider manages all EPG info, meanwhile TV Input
Manager handles streaming contents.
23. TV Input Manager
<service android:name=”droidcon.it.DroidconTvInputService"
android:label="@string/sample_tv_input_label"
android:permission="android.permission.BIND_TV_INPUT">
<intent-filter>
<action android:name="android.media.tv.TvInputService" />
</intent-filter>
<meta-data android:name="android.media.tv.input"
android:resource="@xml/sample_tv_input" />
</service>
onTune() event is fired when user selects a channel, and
notifies the system TV app for changes in the content and
meta data.
TvInputService creates a TvInputService.Session that
implements Handler.Callback to handle player state
changes.
24. TV provider
<uses-permission android:name="com.android.providers.tv.permission.READ_EPG_DATA" />
<uses-permission android:name="com.android.providers.tv.permission.WRITE_EPG_DATA" />
Tv Channel
COLUMN_DESCRIPTION
COLUMN_DISPLAY_NAME
COLUMN_DISPLAY_NUMBER
COLUMN_INPUT_ID
COLUMN_SERVICE_TYPE
COLUMN_TRANSPORT_STREAM_ID
COLUMN_TYPE
COLUMN_INTERNAL_PROVIDER_DATA
COLUMN_NETWORK_AFFILIATION
COLUMN_ORIGINAL_NETWORK_ID
COLUMN_SEARCHABLE
COLUMN_SERVICE_ID
COLUMN_VERSION_NUMBER
COLUMN_VIDEO_FORMAT
Tv Program
COLUMN_LONG_DESCRIPTION
COLUMN_POSTER_ART_URI
COLUMN_SEASON_NUMBER
COLUMN_SHORT_DESCRIPTION
COLUMN_START_TIME_UTC_MILLIS
COLUMN_THUMBNAIL_URI
COLUMN_TITLE
COLUMN_VERSION_NUMBER
COLUMN_VIDEO_HEIGHT
COLUMN_VIDEO_WIDTH
COLUMN_AUDIO_LANGUAGE
COLUMN_BROADCAST_GENRE
COLUMN_CANONICAL_GENRE
COLUMN_CHANNEL_ID
COLUMN_CONTENT_RATING
COLUMN_END_TIME_UTC_MILLIS
COLUMN_EPISODE_NUMBER
COLUMN_EPISODE_TITLE
COLUMN_INTERNAL_PROVIDER_DATA
A basic database of TV content metadata such as channel and program
information.
Manifest permission:
26. Chromecast
some numbers
• 10 million units sold
• 1 billion times for Cast button
• 300+ apps on Play Store
• 6000 developers on 10000 apps
27. Chromecast
components
• Google Cast technology
• Multi-Screen experiece
• Google Cast SDK
• Sender Application
• Android app
• iOS app
• Chrome app
• Receiver Application
• Default Media Receiver
• Styled Media Receiver
• Custom Media Receiver
28. Android Client Application
library dependencies
• Minimum SDK version supported by Google Cast is 9 (Gingerbread)
• MediaRouter API of android-support-v7
• Google Play Services
• AppCompat API of android-support-v7
29. Android Client Application
typical sender application flow
• Sender app starts MediaRouter device discovery: MediaRouter.addCallback
• MediaRouter informs sender app of the route the user selected:
MediaRouter.Callback.onRouteSelected
• Sender app retrieves CastDevice instance: CastDevice.getFromBundle
• Sender app creates and uses GoogleApiClient: GoogleApiClient.Builder
• Sender app launches the receiver app: Cast.CastApi.launchApplication
• Sender app creates a communication channel: Cast.CastApi.setMessageReceivedCallbacks
• Sender sends a message to the receiver over the communication channel:
Cast.CastApi.sendMessage
source: developers.google.com
30. Cast-Ready Device Discovery
capabilities
Remote
Playback
Live
Audio
Live
Video
MediaRouteSelector.Builder builder = new MediaRouteSelector.Builder();
builder.addControlCategory(MediaControlIntent.CATEGORY_REMOTE_PLAYBACK);
builder.addControlCategory(MediaControlIntent.CATEGORY_LIVE_AUDIO);
builder.addControlCategory(MediaControlIntent.CATEGORY_LIVE_VIDEO);
MediaRouterSelector selector = builder.build();
MainAc'vity.java
31. Media Cast Button
easy approach for discovering
source: developers.google.com source: developers.google.com
public boolean onCreateOptionsMenu(Menu menu) {
MenuItem mediaRouteMenuItem = menu.findItem(R.id.media_route_menu_item);
MediaRouteActionProvider mediaRouteActionProvider = (MediaRouteActionProvider)
MenuItemCompat.getActionProvider(mediaRouteMenuItem);
mediaRouteActionProvider.setRouteSelector(mMediaRouteSelector);
}
MainAc'vity.java
33. Receiver Application
powered by Chrome
What is?
HTML5 and Javascript application
What does?
Display the media content on TV
Message handling
Which type?
Default
Media
Receiver
Styled
Media
Receiver
Custom
Media
Receiver
source: unknow
35. Styled Media Receiver
simple and customizable
• Similar to Default Media Player
• CSS UI customization
• Registration
Source:
developers.google.com
36. Custom Media Receiver
whatever you want
• Fully Web Applicaiton
• Debug(able) at 9222
• Registration
Source: developers.google.com
38. Custom Media Receiver
advanced features
• Video Codification/Decodification
• H.264 High Profile Level 4.1, 4.2 and 5
• VP8
• Adaptive Bitrate Streaming
• HTTP Live Streaming (HLS)
• Dynamic Adaptive Streaming over HTTP (MPEG-DASH)
• Smooth Streaming
• Digital Rights Management
• Play Ready DRM
• Widevine DRM
• Media Player Library
39. Custom Media Receiver
advanced example
Index.htm
<html>
<head>
<script
src="//www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js" />
</head>
<body>
<script type="text/javascript">
window.defaultOnLoad = mediaManager.onLoad;
mediaManager.onLoad = function (event) {
if (window.player !== null) {
player.unload();
window.player = null;
}
40. Custom Media Receiver
advanced example
if (event.data['media'] && event.data['media']['contentId']) {
var url = event.data['media']['contentId'];
window.host = new cast.player.api.Host({'mediaElement':mediaElement, 'url':url});
var ext = url.substring(url.lastIndexOf('.'), url.length);
var startAt = event.data['media']['currentTime'] || 0;
var autoplay = event.data['autoplay'] || true;
var protocol = null;
mediaElement.autoplay = autoplay;
if (url.lastIndexOf('.m3u8') >= 0) {
protocol = cast.player.api.CreateHlsStreamingProtocol(host);
} else if (url.lastIndexOf('.mpd') >= 0) {
protocol = cast.player.api.CreateDashStreamingProtocol(host);
} else if (url.indexOf('.ism/') >= 0) {
protocol = cast.player.api.CreateSmoothStreamingProtocol(host);
}
Index.htm
41. Custom Media Receiver
advanced example
host.onError = function(errorCode) {
if (window.player) {
window.player.unload();
window.player = null;
}
};
if (protocol !== null) {
window.player = new cast.player.api.Player(host);
window.player.load(protocol, startAt);
} else {
window.defaultOnLoad(event);
}
}
}
window.player = null;
window.castReceiverManager = cast.receiver.CastReceiverManager.getInstance();
castReceiverManager.start();
Index.html
42. Resources
• Google Cast: https://developers.google.com/cast
• Chromecast App:
http://www.google.it/chrome/devices/chromecast/apps.html
• Google Cast Downloads:
https://developers.google.com/cast/docs/downloads
• Github: https://github.com/googlecast
• Android TV: https://developer.android.com/tv
• Android TV Apps:
http://www.google.it/chrome/devices/chromecast/apps.html
• Android TV codelab: g.co/dev/codelab-androidtv
• Github Leanback:
https://github.com/googlesamples/androidtv-Leanback.git
43. Enjoy the video
thank you to all of you
Source: www.huffingtonpost.ca
+MatteoBonifazi +AlessandroMartellucci
@mbonifazi @martellux