SlideShare a Scribd company logo
1 of 48
Download to read offline
From	Custom	Hardware	
to	Android	TV	and	
Beyond
Valentin	Nagacevschi
Summary
• Custom Hardware ?
• What is Android TV and why develop for it ?
• Think different!
• React Native & Android TV
• Start developing for Android TV
• Takeaways
Custom
Hardware,
still Android
What is Android TV ?
Smart TV Market Share
2018
2017
2016
2015
Smart TV Other TV
Smart TV OS Share
Android
40%
Tizen
23%
WebOS
13%
Roku 6%
Other
40%
Why Android TV ?
Why Android TV ?
• Larger screen
Why Android TV ?
• Larger screen
• Real life shared experiences
Why Android TV ?
• Larger screen
• Real life shared experiences
• Less SMOBIES !!
Less SMOBIES!
Think Different!
Think Different!
• Smartphone without touch
Think Different!
• Smartphone without touch
• Everything is focus oriented
Think Different!
• Smartphone without touch
• Everything is focus oriented
• Use background images, it’s a large screen
Think Different!
• Smartphone without touch
• Everything is focus oriented
• Use background images, it’s a large screen
• Avoid keyboard input
Think Different!
• Smartphone without touch
• Everything is focus oriented
• Use background images, it’s a large screen
• Avoid keyboard input
• Use the microphone
Think Different!
• Smartphone without touch
• Everything is focus oriented
• Use background images, it’s a large screen
• Avoid keyboard input
• Use the microphone
• Use Recommendations
Leanback Support Library
React Native & Android TV
React Native & Android TV
• Supported since RN 0.55 (March, 2018)
React Native & Android TV
• Supported since RN 0.55 (March, 2018)
• Limited if any changes - works of the shelf
React Native & Android TV
• Supported since RN 0.55 (March, 2018)
• Limited if any changes - works of the shelf
• Can be published as usual in Google Play
Use Your Imagination
• Use focus and selectors
• Animated State List - horizontal or 2D scrolling
• Focusable components
• Full-screen background images
D-Pad Control
Navigation using Remote Control
How to Start the Development?
How to Start the Development?
How to Start the Development?
How to Start the Development?
How to Start the Development?
Connect to the Android TV
> adb connect 10.0.208.153:5555
connected to 10.0.208.153:5555
> adb devices
List of devices attached
10.0.208.153:5555 device
> react-native run android
Android Manifest File
<uses-feature android:name="android.hardware.microphone" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<application
…
android:label="@string/app_name"
android:banner="@drawable/videos_by_google_banner"
android:logo=“@drawable/videos_by_google_banner">
<activity
…
android:label="@string/app_name"
android:logo="@drawable/videos_by_google_banner"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
Focusable Button
<TouchableOpacity
style={[styles.button, this.state.currentStyle]}
onPress={this.onPress}
onFocus={() => this.setState({ currentStyle: { borderColor: '#62DBFB' }})}
onBlur={() => this.setState({ currentStyle: { borderColor: '#CC0000' }})}
>
<Text style={styles.text} >Press Me</Text>
</TouchableOpacity>
Remote Control Events
const TVEventHandler = require(‘TVEventHandler’);
...
componentDidMount() {
this.tvEventHandler = new TVEventHandler();
this.tvEventHandler.enable(this, (cmp, evt) => {
console.log('TVEvent' , evt);
});
}
TVEvent, { eventType: 'up' }
TVEvent, { eventType: 'right' }
TVEvent, { eventType: 'down' }
TVEvent, { eventType: 'left' }
TVEvent, { eventType: 'select' }
TVEvent, { eventType: 'rewind' }
TVEvent, { eventType: 'fastForward' }
TVEvent, { eventType: 'playstop' }
TVEvent, { eventType: 'focus' }
TVEvent, { eventType: ‘blur' }
React Native Voice
import Voice from ‘react-native-voice';
constructor(props) {
Voice.onSpeechStart = this.onSpeechStartHandler.bind(this);
Voice.onSpeechEnd = this.onSpeechEndHandler.bind(this);
Voice.onSpeechResults = this.onSpeechResultsHandler.bind(this);
}
onPress = (e) => {
Voice.start('en-GB');
}
onSpeechResultsHandler = ({ value }) => {
console.log(‘RESULT', value);
}
React Native Music Control
import MusicControl from 'react-native-music-control';
MusicControl.enableControl('setRating', false);
MusicControl.enableControl('volume', true);
...
MusicControl.setNowPlaying({
title: ‘Stay With Me',
artwork: 'https://i.imgur.com/e1cpwdo.png',
artist: ‘Sam Smith',
album: ‘In the Lonely Hour',
genre: 'Ballad, Rhythm and Blues, Pop',
duration: 294,
description: '',
color: 0xFFFFFF,
date: ‘2014-01-02T00:00:00Z',
rating: 84,
notificationIcon: 'my_custom_icon'
});
ADB Goodies
/* launch developer menu */

adb shell input keyevent KEYCODE_MENU

/* go back */

adb shell input keyevent KEYCODE_BACK

/* input keyevent */

adb shell input keyevent 19 // DPAD_DOWN

/* input text */

adb shell input text "my.email@domain.com"

/* install apk */

adb install -r /path-to-your-apk/app-debug.apk

/* run app */

adb shell monkey -p com.magicworks.androidtv -c

/* run main intent with deep link params */

adb shell am start -a android.intent.action.MAIN -d "tvapp://ok"

/* launch settings options */

adb shell am start -a android.settings.SETTINGS
Takeaways
Takeaways
• No better time to start developing for Android TV
Takeaways
• No better time to start developing for Android TV
• React Native just works
Takeaways
• No better time to start developing for Android TV
• React Native just works
• Be creative when designing for Android TV
Takeaways
• No better time to start developing for Android TV
• React Native just works
• Be creative when designing for Android TV
• No touch, no keyboard, use focus, microphone, background images
Takeaways
• No better time to start developing for Android TV
• React Native just works
• Be creative when designing for Android TV
• No touch, no keyboard, use focus, microphone, background images
• AndroidX (with LeanBack included) support on RN 0.60
Questions?	
Thank	you	!
linkedin.com/in/vnagacevschi/

More Related Content

What's hot

Flutter Road Map.pptx
Flutter Road Map.pptxFlutter Road Map.pptx
Flutter Road Map.pptxabdullahwale
 
Android TV: Building apps with Google’s Leanback Library
Android TV: Building apps with  Google’s Leanback LibraryAndroid TV: Building apps with  Google’s Leanback Library
Android TV: Building apps with Google’s Leanback LibraryJoe Birch
 
Getting your app on Android TV
Getting your app on Android TVGetting your app on Android TV
Getting your app on Android TVXavier Hallade
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausWomen in Technology Poland
 
.Net platform .Net core fundamentals
.Net platform .Net core  fundamentals.Net platform .Net core  fundamentals
.Net platform .Net core fundamentalsHosein Mansouri
 
10 Advanced CSS Techniques (You Wish You Knew More About)
10 Advanced CSS Techniques (You Wish You Knew More About)10 Advanced CSS Techniques (You Wish You Knew More About)
10 Advanced CSS Techniques (You Wish You Knew More About)Emily Lewis
 
Angular Advanced Routing
Angular Advanced RoutingAngular Advanced Routing
Angular Advanced RoutingLaurent Duveau
 
Flutter presentation.pptx
Flutter presentation.pptxFlutter presentation.pptx
Flutter presentation.pptxFalgunSorathiya
 
Android app development
Android app developmentAndroid app development
Android app developmentTanmoy Roy
 
The WAF book (Web App Firewall )
The WAF book  (Web App Firewall )The WAF book  (Web App Firewall )
The WAF book (Web App Firewall )Lior Rotkovitch
 
XSS Attacks Exploiting XSS Filter by Masato Kinugawa - CODE BLUE 2015
XSS Attacks Exploiting XSS Filter by Masato Kinugawa - CODE BLUE 2015XSS Attacks Exploiting XSS Filter by Masato Kinugawa - CODE BLUE 2015
XSS Attacks Exploiting XSS Filter by Masato Kinugawa - CODE BLUE 2015CODE BLUE
 
PPT on Angular 2 Development Tutorial
PPT on Angular 2 Development TutorialPPT on Angular 2 Development Tutorial
PPT on Angular 2 Development TutorialPaddy Lock
 
Asp.Net Identity
Asp.Net IdentityAsp.Net Identity
Asp.Net IdentityMarwa Ahmad
 
OpenID for Verifiable Credentials
OpenID for Verifiable CredentialsOpenID for Verifiable Credentials
OpenID for Verifiable CredentialsTorsten Lodderstedt
 
Top 30 Node.js interview questions
Top 30 Node.js interview questionsTop 30 Node.js interview questions
Top 30 Node.js interview questionstechievarsity
 

What's hot (20)

Flutter Road Map.pptx
Flutter Road Map.pptxFlutter Road Map.pptx
Flutter Road Map.pptx
 
Android TV: Building apps with Google’s Leanback Library
Android TV: Building apps with  Google’s Leanback LibraryAndroid TV: Building apps with  Google’s Leanback Library
Android TV: Building apps with Google’s Leanback Library
 
Getting your app on Android TV
Getting your app on Android TVGetting your app on Android TV
Getting your app on Android TV
 
Android Location and Maps
Android Location and MapsAndroid Location and Maps
Android Location and Maps
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
 
.Net platform .Net core fundamentals
.Net platform .Net core  fundamentals.Net platform .Net core  fundamentals
.Net platform .Net core fundamentals
 
10 Advanced CSS Techniques (You Wish You Knew More About)
10 Advanced CSS Techniques (You Wish You Knew More About)10 Advanced CSS Techniques (You Wish You Knew More About)
10 Advanced CSS Techniques (You Wish You Knew More About)
 
Why Vue.js?
Why Vue.js?Why Vue.js?
Why Vue.js?
 
Angular Advanced Routing
Angular Advanced RoutingAngular Advanced Routing
Angular Advanced Routing
 
Flutter presentation.pptx
Flutter presentation.pptxFlutter presentation.pptx
Flutter presentation.pptx
 
Android app development
Android app developmentAndroid app development
Android app development
 
The WAF book (Web App Firewall )
The WAF book  (Web App Firewall )The WAF book  (Web App Firewall )
The WAF book (Web App Firewall )
 
Angular
AngularAngular
Angular
 
XSS Attacks Exploiting XSS Filter by Masato Kinugawa - CODE BLUE 2015
XSS Attacks Exploiting XSS Filter by Masato Kinugawa - CODE BLUE 2015XSS Attacks Exploiting XSS Filter by Masato Kinugawa - CODE BLUE 2015
XSS Attacks Exploiting XSS Filter by Masato Kinugawa - CODE BLUE 2015
 
.Net Core
.Net Core.Net Core
.Net Core
 
PPT on Angular 2 Development Tutorial
PPT on Angular 2 Development TutorialPPT on Angular 2 Development Tutorial
PPT on Angular 2 Development Tutorial
 
Asp.Net Identity
Asp.Net IdentityAsp.Net Identity
Asp.Net Identity
 
OpenID for Verifiable Credentials
OpenID for Verifiable CredentialsOpenID for Verifiable Credentials
OpenID for Verifiable Credentials
 
Top 30 Node.js interview questions
Top 30 Node.js interview questionsTop 30 Node.js interview questions
Top 30 Node.js interview questions
 
TypeScript and Angular workshop
TypeScript and Angular workshopTypeScript and Angular workshop
TypeScript and Angular workshop
 

Similar to React Native on Android TV

How to deal with Fragmentation on Android
How to deal with Fragmentation on AndroidHow to deal with Fragmentation on Android
How to deal with Fragmentation on AndroidSittiphol Phanvilai
 
Android design lecture #1
Android design   lecture #1Android design   lecture #1
Android design lecture #1Vitali Pekelis
 
Philly ete-2011
Philly ete-2011Philly ete-2011
Philly ete-2011davyjones
 
Christian Kurzke; Getting Your Content on the Big Screen
Christian Kurzke; Getting Your Content on the Big ScreenChristian Kurzke; Getting Your Content on the Big Screen
Christian Kurzke; Getting Your Content on the Big ScreenDroidcon Berlin
 
Migrating to Android TV
Migrating to Android TVMigrating to Android TV
Migrating to Android TVDavid Carver
 
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009sullis
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Todaydavyjones
 
Phonegap - An Introduction
Phonegap - An IntroductionPhonegap - An Introduction
Phonegap - An IntroductionTyler Johnston
 
Introduction to Android - Mobile Portland
Introduction to Android - Mobile PortlandIntroduction to Android - Mobile Portland
Introduction to Android - Mobile Portlandsullis
 
Discover Android Wear
Discover Android WearDiscover Android Wear
Discover Android WearTroy Miles
 
Debugging and Tuning Mobile Web Sites with Modern Web Browsers
Debugging and Tuning Mobile Web Sites with Modern Web BrowsersDebugging and Tuning Mobile Web Sites with Modern Web Browsers
Debugging and Tuning Mobile Web Sites with Modern Web BrowsersTroy Miles
 
SmartPhone Design and Delivery
SmartPhone Design and DeliverySmartPhone Design and Delivery
SmartPhone Design and DeliveryJason Diehl
 
Beating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett DuncavageBeating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett DuncavageXamarin
 
PRESENTATION ON ANDROID
PRESENTATION ON ANDROIDPRESENTATION ON ANDROID
PRESENTATION ON ANDROIDRajat Kumar
 
Using the Presentation API and external screens on Android
Using the Presentation API and external screens on AndroidUsing the Presentation API and external screens on Android
Using the Presentation API and external screens on AndroidXavier Hallade
 
Serenity for Android: Designing for Android TV Devices
Serenity for Android: Designing for Android TV DevicesSerenity for Android: Designing for Android TV Devices
Serenity for Android: Designing for Android TV DevicesDavid Carver
 
Mobile html5 today
Mobile html5 todayMobile html5 today
Mobile html5 todayIdo Green
 

Similar to React Native on Android TV (20)

How to deal with Fragmentation on Android
How to deal with Fragmentation on AndroidHow to deal with Fragmentation on Android
How to deal with Fragmentation on Android
 
Android design lecture #1
Android design   lecture #1Android design   lecture #1
Android design lecture #1
 
Building TV apps with Chromecast
Building TV apps with ChromecastBuilding TV apps with Chromecast
Building TV apps with Chromecast
 
Philly ete-2011
Philly ete-2011Philly ete-2011
Philly ete-2011
 
Christian Kurzke; Getting Your Content on the Big Screen
Christian Kurzke; Getting Your Content on the Big ScreenChristian Kurzke; Getting Your Content on the Big Screen
Christian Kurzke; Getting Your Content on the Big Screen
 
Migrating to Android TV
Migrating to Android TVMigrating to Android TV
Migrating to Android TV
 
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009
 
The Immobile Web
The Immobile WebThe Immobile Web
The Immobile Web
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
 
Phonegap - An Introduction
Phonegap - An IntroductionPhonegap - An Introduction
Phonegap - An Introduction
 
Introduction to Android - Mobile Portland
Introduction to Android - Mobile PortlandIntroduction to Android - Mobile Portland
Introduction to Android - Mobile Portland
 
Discover Android Wear
Discover Android WearDiscover Android Wear
Discover Android Wear
 
Debugging and Tuning Mobile Web Sites with Modern Web Browsers
Debugging and Tuning Mobile Web Sites with Modern Web BrowsersDebugging and Tuning Mobile Web Sites with Modern Web Browsers
Debugging and Tuning Mobile Web Sites with Modern Web Browsers
 
SmartPhone Design and Delivery
SmartPhone Design and DeliverySmartPhone Design and Delivery
SmartPhone Design and Delivery
 
Beating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett DuncavageBeating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett Duncavage
 
Hacking Android OS
Hacking Android OSHacking Android OS
Hacking Android OS
 
PRESENTATION ON ANDROID
PRESENTATION ON ANDROIDPRESENTATION ON ANDROID
PRESENTATION ON ANDROID
 
Using the Presentation API and external screens on Android
Using the Presentation API and external screens on AndroidUsing the Presentation API and external screens on Android
Using the Presentation API and external screens on Android
 
Serenity for Android: Designing for Android TV Devices
Serenity for Android: Designing for Android TV DevicesSerenity for Android: Designing for Android TV Devices
Serenity for Android: Designing for Android TV Devices
 
Mobile html5 today
Mobile html5 todayMobile html5 today
Mobile html5 today
 

Recently uploaded

Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 

Recently uploaded (20)

Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 

React Native on Android TV

  • 2. Summary • Custom Hardware ? • What is Android TV and why develop for it ? • Think different! • React Native & Android TV • Start developing for Android TV • Takeaways
  • 5. Smart TV Market Share 2018 2017 2016 2015 Smart TV Other TV
  • 6. Smart TV OS Share Android 40% Tizen 23% WebOS 13% Roku 6% Other 40%
  • 8. Why Android TV ? • Larger screen
  • 9. Why Android TV ? • Larger screen • Real life shared experiences
  • 10. Why Android TV ? • Larger screen • Real life shared experiences • Less SMOBIES !!
  • 12.
  • 15. Think Different! • Smartphone without touch • Everything is focus oriented
  • 16. Think Different! • Smartphone without touch • Everything is focus oriented • Use background images, it’s a large screen
  • 17. Think Different! • Smartphone without touch • Everything is focus oriented • Use background images, it’s a large screen • Avoid keyboard input
  • 18. Think Different! • Smartphone without touch • Everything is focus oriented • Use background images, it’s a large screen • Avoid keyboard input • Use the microphone
  • 19. Think Different! • Smartphone without touch • Everything is focus oriented • Use background images, it’s a large screen • Avoid keyboard input • Use the microphone • Use Recommendations
  • 20.
  • 22. React Native & Android TV
  • 23. React Native & Android TV • Supported since RN 0.55 (March, 2018)
  • 24. React Native & Android TV • Supported since RN 0.55 (March, 2018) • Limited if any changes - works of the shelf
  • 25. React Native & Android TV • Supported since RN 0.55 (March, 2018) • Limited if any changes - works of the shelf • Can be published as usual in Google Play
  • 26.
  • 27. Use Your Imagination • Use focus and selectors • Animated State List - horizontal or 2D scrolling • Focusable components • Full-screen background images
  • 30. How to Start the Development?
  • 31. How to Start the Development?
  • 32. How to Start the Development?
  • 33. How to Start the Development?
  • 34. How to Start the Development?
  • 35. Connect to the Android TV > adb connect 10.0.208.153:5555 connected to 10.0.208.153:5555 > adb devices List of devices attached 10.0.208.153:5555 device > react-native run android
  • 36. Android Manifest File <uses-feature android:name="android.hardware.microphone" android:required="false" /> <uses-feature android:name="android.hardware.touchscreen" android:required="false" /> <application … android:label="@string/app_name" android:banner="@drawable/videos_by_google_banner" android:logo=“@drawable/videos_by_google_banner"> <activity … android:label="@string/app_name" android:logo="@drawable/videos_by_google_banner" android:screenOrientation="landscape"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LEANBACK_LAUNCHER" /> </intent-filter> </activity>
  • 37. Focusable Button <TouchableOpacity style={[styles.button, this.state.currentStyle]} onPress={this.onPress} onFocus={() => this.setState({ currentStyle: { borderColor: '#62DBFB' }})} onBlur={() => this.setState({ currentStyle: { borderColor: '#CC0000' }})} > <Text style={styles.text} >Press Me</Text> </TouchableOpacity>
  • 38. Remote Control Events const TVEventHandler = require(‘TVEventHandler’); ... componentDidMount() { this.tvEventHandler = new TVEventHandler(); this.tvEventHandler.enable(this, (cmp, evt) => { console.log('TVEvent' , evt); }); } TVEvent, { eventType: 'up' } TVEvent, { eventType: 'right' } TVEvent, { eventType: 'down' } TVEvent, { eventType: 'left' } TVEvent, { eventType: 'select' } TVEvent, { eventType: 'rewind' } TVEvent, { eventType: 'fastForward' } TVEvent, { eventType: 'playstop' } TVEvent, { eventType: 'focus' } TVEvent, { eventType: ‘blur' }
  • 39. React Native Voice import Voice from ‘react-native-voice'; constructor(props) { Voice.onSpeechStart = this.onSpeechStartHandler.bind(this); Voice.onSpeechEnd = this.onSpeechEndHandler.bind(this); Voice.onSpeechResults = this.onSpeechResultsHandler.bind(this); } onPress = (e) => { Voice.start('en-GB'); } onSpeechResultsHandler = ({ value }) => { console.log(‘RESULT', value); }
  • 40. React Native Music Control import MusicControl from 'react-native-music-control'; MusicControl.enableControl('setRating', false); MusicControl.enableControl('volume', true); ... MusicControl.setNowPlaying({ title: ‘Stay With Me', artwork: 'https://i.imgur.com/e1cpwdo.png', artist: ‘Sam Smith', album: ‘In the Lonely Hour', genre: 'Ballad, Rhythm and Blues, Pop', duration: 294, description: '', color: 0xFFFFFF, date: ‘2014-01-02T00:00:00Z', rating: 84, notificationIcon: 'my_custom_icon' });
  • 41. ADB Goodies /* launch developer menu */ adb shell input keyevent KEYCODE_MENU /* go back */ adb shell input keyevent KEYCODE_BACK /* input keyevent */ adb shell input keyevent 19 // DPAD_DOWN /* input text */ adb shell input text "my.email@domain.com" /* install apk */ adb install -r /path-to-your-apk/app-debug.apk /* run app */ adb shell monkey -p com.magicworks.androidtv -c /* run main intent with deep link params */ adb shell am start -a android.intent.action.MAIN -d "tvapp://ok" /* launch settings options */ adb shell am start -a android.settings.SETTINGS
  • 43. Takeaways • No better time to start developing for Android TV
  • 44. Takeaways • No better time to start developing for Android TV • React Native just works
  • 45. Takeaways • No better time to start developing for Android TV • React Native just works • Be creative when designing for Android TV
  • 46. Takeaways • No better time to start developing for Android TV • React Native just works • Be creative when designing for Android TV • No touch, no keyboard, use focus, microphone, background images
  • 47. Takeaways • No better time to start developing for Android TV • React Native just works • Be creative when designing for Android TV • No touch, no keyboard, use focus, microphone, background images • AndroidX (with LeanBack included) support on RN 0.60